mie: update bluelib api usage
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#include <blue/object/string.h>
|
||||
#include <blue/ds/string.h>
|
||||
#include <mie/ctx.h>
|
||||
#include <mie/ir/alloca.h>
|
||||
#include <mie/ir/block.h>
|
||||
@@ -52,15 +52,16 @@ struct mie_record *mie_builder_put_record(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
b_queue_iterator it = {};
|
||||
b_queue_foreach (&it, &builder->b_module->m_records) {
|
||||
struct mie_value *rec
|
||||
= b_unbox(struct mie_value, it.entry, v_entry);
|
||||
b_queue_entry *entry = b_queue_first(&builder->b_module->m_records);
|
||||
while (entry) {
|
||||
struct mie_value *rec = b_unbox(struct mie_value, entry, v_entry);
|
||||
|
||||
if (!strcmp(rec->v_name.n_str, name)) {
|
||||
/* TODO what to do about `val` here? */
|
||||
return MIE_RECORD(rec);
|
||||
}
|
||||
|
||||
entry = b_queue_next(entry);
|
||||
}
|
||||
|
||||
struct mie_record *rec = mie_record_create(val);
|
||||
@@ -77,14 +78,15 @@ struct mie_record *mie_builder_get_record(
|
||||
return NULL;
|
||||
}
|
||||
|
||||
b_queue_iterator it = {};
|
||||
b_queue_foreach (&it, &builder->b_module->m_records) {
|
||||
struct mie_value *rec
|
||||
= b_unbox(struct mie_value, it.entry, v_entry);
|
||||
b_queue_entry *entry = b_queue_first(&builder->b_module->m_records);
|
||||
while (entry) {
|
||||
struct mie_value *rec = b_unbox(struct mie_value, entry, v_entry);
|
||||
|
||||
if (!strcmp(rec->v_name.n_str, name)) {
|
||||
return MIE_RECORD(rec);
|
||||
}
|
||||
|
||||
entry = b_queue_next(entry);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user