mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Add const qualifier to generated Proc structures.
This commit is contained in:
+2
-2
@@ -1086,8 +1086,8 @@ mrb_dump_irep_cstruct(mrb_state *mrb, const mrb_irep *irep, uint8_t flags, FILE
|
||||
}
|
||||
n = dump_irep_struct(mrb, irep, flags, fp, initname, 0, &max);
|
||||
if (n != MRB_DUMP_OK) return n;
|
||||
fprintf(fp, "#ifdef __cplusplus\nextern struct RProc %s[];\n#endif\n", initname);
|
||||
fprintf(fp, "struct RProc %s[] = {{\n", initname);
|
||||
fprintf(fp, "#ifdef __cplusplus\nextern const struct RProc %s[];\n#endif\n", initname);
|
||||
fprintf(fp, "const struct RProc %s[] = {{\n", initname);
|
||||
fprintf(fp, "NULL,NULL,MRB_TT_PROC,7,0,{&%s_irep_0},NULL,{NULL},\n}};\n", initname);
|
||||
return MRB_DUMP_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user