From dec34d6c7bc0849a469ab517ad5f24e9c3ab9e4b Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Sat, 6 Jun 2020 18:02:15 +0900 Subject: Split `MRB_BINARY_FORMAT` to major and minor. The minor versions should be upper compatible. So mere opcode, section addition can be done without breaking compiled binary. --- src/dump.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dump.c') diff --git a/src/dump.c b/src/dump.c index c0f0ca0a8..8cd69cd29 100644 --- a/src/dump.c +++ b/src/dump.c @@ -726,7 +726,8 @@ write_rite_binary_header(mrb_state *mrb, size_t binary_size, uint8_t *bin, uint8 uint32_t offset; memcpy(header->binary_ident, RITE_BINARY_IDENT, sizeof(header->binary_ident)); - memcpy(header->binary_version, RITE_BINARY_FORMAT_VER, sizeof(header->binary_version)); + memcpy(header->major_version, RITE_BINARY_MAJOR_VER, sizeof(header->major_version)); + memcpy(header->minor_version, RITE_BINARY_MAJOR_VER, sizeof(header->minor_version)); memcpy(header->compiler_name, RITE_COMPILER_NAME, sizeof(header->compiler_name)); memcpy(header->compiler_version, RITE_COMPILER_VERSION, sizeof(header->compiler_version)); mrb_assert(binary_size <= UINT32_MAX); -- cgit v1.2.3