aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-27 23:51:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-03-27 23:51:09 +0000
commit55152ae26d200be3bd59170e9750949058fa82a2 (patch)
tree5b75041b76de4b4eeeaa835f8df3832252ce5a7e /gc.c
parent4f06c9f64de01a6f082af82655f38938002c6891 (diff)
downloadruby-55152ae26d200be3bd59170e9750949058fa82a2.tar.gz
internal.h: rb_imemo_new_debug
* internal.h (rb_imemo_new_debug): pretend rb_imemo_new. * gc.c (rb_imemo_new_debug): share with rb_imemo_new. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/gc.c b/gc.c
index c9258d911f..852a49eb72 100644
--- a/gc.c
+++ b/gc.c
@@ -1787,6 +1787,8 @@ rb_node_newnode(enum node_type type, VALUE a0, VALUE a1, VALUE a2)
return n;
}
+#undef rb_imemo_new
+
VALUE
rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
{
@@ -1798,8 +1800,7 @@ rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0)
VALUE
rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0, const char *file, int line)
{
- VALUE flags = T_IMEMO | (type << FL_USHIFT) | FL_WB_PROTECTED;
- VALUE memo = newobj_of(v0, flags, v1, v2, v3);
+ VALUE memo = rb_imemo_new(type, v1, v2, v3, v0);
fprintf(stderr, "memo %p (type: %d) @ %s:%d\n", memo, imemo_type(memo), file, line);
return memo;
}