wip: begin writer impl for externs
This commit is contained in:
@@ -39,6 +39,9 @@ int fzl_write(fzl_writer_t *writer, fzl_gen_t *gen)
|
||||
const char hdr[5] = {'F', 'Z', 'L', 0x0, 0x1};
|
||||
fwrite(hdr, sizeof(char), 5, fp);
|
||||
fwrite(&gen->consts->size, sizeof(size_t), 1, fp);
|
||||
fwrite(&gen->extern_libs_count, sizeof(size_t), 1, fp);
|
||||
fwrite(&gen->extern_types_count, sizeof(size_t), 1, fp);
|
||||
fwrite(&gen->extern_fns_count, sizeof(size_t), 1, fp);
|
||||
fwrite(&gen->ops_count, sizeof(size_t), 1, fp);
|
||||
|
||||
for (size_t i = 0; i < gen->consts->size; i++)
|
||||
@@ -54,6 +57,8 @@ int fzl_write(fzl_writer_t *writer, fzl_gen_t *gen)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: write libs, types and functions
|
||||
|
||||
if (gen->ops_count > 0)
|
||||
fwrite(gen->ops, sizeof(uint64_t), gen->ops_count, fp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user