asm: update bluelib api usage
This commit is contained in:
@@ -118,10 +118,10 @@ enum ivy_status ivy_assembler_finish(struct ivy_assembler *as)
|
||||
header.h_table_len = b_i16_htob(0);
|
||||
header.h_magic = b_i32_htob(IVY_BIN_MAGIC);
|
||||
|
||||
b_queue_iterator it = {0};
|
||||
b_queue_foreach (&it, &as->as_table) {
|
||||
b_queue_entry *entry = b_queue_first(&as->as_table);
|
||||
while (entry) {
|
||||
struct asm_table_entry *e
|
||||
= b_unbox(struct asm_table_entry, it.entry, e_entry);
|
||||
= b_unbox(struct asm_table_entry, entry, e_entry);
|
||||
size_t w = fwrite(&e->e_data, 1, sizeof e->e_data, as->as_data);
|
||||
|
||||
if (w < sizeof e->e_data) {
|
||||
@@ -129,6 +129,7 @@ enum ivy_status ivy_assembler_finish(struct ivy_assembler *as)
|
||||
}
|
||||
|
||||
nr_table_entries++;
|
||||
entry = b_queue_next(entry);
|
||||
}
|
||||
|
||||
fwrite(&xdat, 1, sizeof xdat, as->as_data);
|
||||
|
||||
Reference in New Issue
Block a user