Skip to content

Commit 85fe122

Browse files
committed
WIP
1 parent dd33487 commit 85fe122

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

include/mrc_common.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
#define mrc_free free
2424
#endif
2525

26-
typedef void mrb_state;
26+
//typedef void mrb_state;
27+
#define mrb_state void
2728

2829
#ifdef MRB_USE_CXX_ABI
2930
#define MRC_USE_CXX_ABI

src/cdump.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ cdump_sym(mrc_ccontext *c, mrc_sym sym, const char *var_name, int idx, mrc_strin
298298
const char *op_name;
299299
mrc_int len = constant->length;
300300

301-
if (!name) {
301+
if (*name == '\0') {
302302
mrc_str_free(name_obj);
303303
return MRC_DUMP_INVALID_ARGUMENT;
304304
}
@@ -330,7 +330,7 @@ cdump_sym(mrc_ccontext *c, mrc_sym sym, const char *var_name, int idx, mrc_strin
330330
mrc_str_cat_cstr(init_syms_code, var_name);
331331
snprintf(buf, sizeof(buf), "[%d] = ", idx);
332332
mrc_str_cat_cstr(init_syms_code, buf);
333-
mrc_str_cat_lit(init_syms_code, "mrc_intern_lit(mrb, ");
333+
mrc_str_cat_lit(init_syms_code, "mrb_intern_lit(mrb, ");
334334
mrc_string *escaped = mrc_str_escape(c, name_obj);
335335
mrc_str_free(name_obj);
336336
mrc_str_cat_str(init_syms_code, escaped);
@@ -477,7 +477,7 @@ cdump_irep_struct(mrc_ccontext *c, const mrc_irep *irep, uint8_t flags, FILE *fp
477477
/* dump pool */
478478
if (0 < irep->plen) {
479479
len=irep->plen;
480-
fprintf(fp, "static const mrb_pool_value %s_pool_%d[%d] = {\n", name, n, len);
480+
fprintf(fp, "static const mrb_irep_pool %s_pool_%d[%d] = {\n", name, n, len);
481481
for (i=0; i<len; i++) {
482482
if (cdump_pool(c, &irep->pool[i], fp) != MRC_DUMP_OK)
483483
return MRC_DUMP_INVALID_ARGUMENT;

0 commit comments

Comments
 (0)