diff options
Diffstat (limited to 'include/bytecode')
-rw-r--r-- | include/bytecode/bytecode.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/bytecode/bytecode.h b/include/bytecode/bytecode.h index 83d62b9..346455c 100644 --- a/include/bytecode/bytecode.h +++ b/include/bytecode/bytecode.h @@ -64,7 +64,8 @@ typedef enum { AMAL_OP_LABEL /* label - Label. This is the target of a jump instruction. Jump instructions only jump to labels in the same function scope */ } AmalOpcode; -#define AMAL_BYTECODE_MAGIC_NUMBER (u32)0xdec05eba +#define AMAL_BYTECODE_MAGIC_NUMBER "\xde\xc0\x5e\xba" +#define AMAL_BYTECODE_MAGIC_NUMBER_SIZE 4 #define AMAL_BYTECODE_MAJOR_VERSION 1 #define AMAL_BYTECODE_MINOR_VERSION 0 #define AMAL_BYTECODE_PATCH_VERSION 0 @@ -83,11 +84,10 @@ typedef u8 AmalOpcodeType; /* TODO: Make sure this pragma pack works on all platforms */ #pragma pack(push, 1) typedef struct { - u32 magic_number; /* AMAL_BYTECODE_MAGIC_NUMBER */ + u8 magic_number[AMAL_BYTECODE_MAGIC_NUMBER_SIZE]; /* @AMAL_BYTECODE_MAGIC_NUMBER */ u8 major_version; u8 minor_version; u8 patch_version; - u8 endian; /* 0 = little endian, 1 = big endian */ } BytecodeHeader; #pragma pack(pop) |