Merge pull request #19 from jpoirier/develop

make the ugly hack uglier
This commit is contained in:
Joseph Poirier 2018-01-17 00:44:32 -06:00 committed by GitHub
commit 2e35505e26
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -443,9 +443,13 @@ void ExpressionPushInt(struct ParseState *Parser,
struct Value *ValueLoc = VariableAllocValueFromType(Parser->pc, Parser,
&Parser->pc->IntType, false, NULL, false);
// jdp: ugly hack to properly print long values
ValueLoc->Val->UnsignedLongInteger = IntValue;
ValueLoc->Val->LongInteger = IntValue;
ValueLoc->Val->Integer = IntValue;
ValueLoc->Val->UnsignedLongInteger = (unsigned long)IntValue;
ValueLoc->Val->LongInteger = (long)IntValue;
ValueLoc->Val->Integer = (int)IntValue;
ValueLoc->Val->ShortInteger = (short)IntValue;
ValueLoc->Val->UnsignedShortInteger = (unsigned short)IntValue;
ValueLoc->Val->UnsignedInteger = (unsigned int)IntValue;
ExpressionStackPushValueNode(Parser, StackTop, ValueLoc);
}

View file

@ -9,7 +9,7 @@
/* VER, the git hash number, and TAG are obtained via the Makefile */
#define PICOC_VERSION TAG " r" VER
#else
#define PICOC_VERSION "v2.3"
#define PICOC_VERSION "v2.3.1"
#endif
#include "interpreter.h"