diff options
Diffstat (limited to 'gc.c')
-rw-r--r-- | gc.c | 21 |
1 files changed, 19 insertions, 2 deletions
@@ -646,8 +646,8 @@ heaps_increment(rb_objspace_t *objspace) return FALSE; } -VALUE -rb_newobj(void) +static VALUE +newobj(VALUE klass, VALUE flags) { rb_objspace_t *objspace = &rb_objspace; VALUE obj; @@ -688,6 +688,23 @@ rb_newobj(void) return obj; } +VALUE +rb_newobj(void) +{ + return newobj(0, T_NONE); +} + +VALUE +rb_newobj_of(VALUE klass, VALUE flags) +{ + VALUE obj; + + obj = newobj(klass, flags); + OBJSETUP(obj, klass, flags); + + return obj; +} + NODE* rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2) { |