wip: working on extern in VM
- Feat: add writer externs writing fns - Feat: add VM reader functions
This commit is contained in:
@@ -40,10 +40,10 @@ int fzl_write(fzl_writer_t *writer, fzl_gen_t *gen)
|
||||
|
||||
const char hdr[5] = {'F', 'Z', 'L', 0x0, 0x2};
|
||||
fwrite(hdr, sizeof(char), 5, fd);
|
||||
fwrite(&gen->consts->size, sizeof(size_t), 1, fd);
|
||||
fwrite(&gen->extern_libs_count, sizeof(size_t), 1, fd);
|
||||
fwrite(&gen->extern_types_count, sizeof(size_t), 1, fd);
|
||||
fwrite(&gen->extern_fns_count, sizeof(size_t), 1, fd);
|
||||
fwrite(&gen->consts->size, sizeof(uint16_t), 1, fd);
|
||||
fwrite(&gen->extern_libs_count, sizeof(uint16_t), 1, fd);
|
||||
fwrite(&gen->extern_types_count, sizeof(uint16_t), 1, fd);
|
||||
fwrite(&gen->extern_fns_count, sizeof(uint16_t), 1, fd);
|
||||
fwrite(&gen->ops_count, sizeof(size_t), 1, fd);
|
||||
|
||||
bool result = wr_consts(fd, gen->consts);
|
||||
|
||||
Reference in New Issue
Block a user