Improve prototype for mrb_objspace_page_slot_size(); ref #5032

If it qualify a return type that is not a pointer with `const`, the
compiler ignores it.
This commit is contained in:
dearblue
2020-07-22 00:18:28 +09:00
parent 5c2b11d215
commit ccd5f203bf
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ struct mrb_state;
#define MRB_EACH_OBJ_BREAK 1
typedef int (mrb_each_object_callback)(struct mrb_state *mrb, struct RBasic *obj, void *data);
void mrb_objspace_each_objects(struct mrb_state *mrb, mrb_each_object_callback *callback, void *data);
const mrb_int mrb_objspace_page_slot_size();
mrb_int mrb_objspace_page_slot_size(void);
MRB_API void mrb_free_context(struct mrb_state *mrb, struct mrb_context *c);
#ifndef MRB_GC_ARENA_SIZE
+2 -2
View File
@@ -1599,8 +1599,8 @@ mrb_objspace_each_objects(mrb_state *mrb, mrb_each_object_callback *callback, vo
}
}
const mrb_int
mrb_objspace_page_slot_size()
mrb_int
mrb_objspace_page_slot_size(void)
{
const mrb_int i = sizeof(RVALUE);
return i;