aboutsummaryrefslogtreecommitdiffstats
path: root/internal.h
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 /internal.h
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 'internal.h')
-rw-r--r--internal.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/internal.h b/internal.h
index 317e2e4072..76435c16b0 100644
--- a/internal.h
+++ b/internal.h
@@ -585,11 +585,7 @@ struct vm_ifunc {
ID id;
};
-#if IMEMO_DEBUG
-#define IFUNC_NEW(a, b) ((struct vm_ifunc *)rb_imemo_new_debug(imemo_ifunc, (VALUE)(a), (VALUE)(b), 0, 0, __FILE__, __LINE__))
-#else
#define IFUNC_NEW(a, b) ((struct vm_ifunc *)rb_imemo_new(imemo_ifunc, (VALUE)(a), (VALUE)(b), 0, 0))
-#endif
/* MEMO */
@@ -611,11 +607,7 @@ struct MEMO {
#define MEMO_CAST(m) ((struct MEMO *)m)
-#if IMEMO_DEBUG
-#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new_debug(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0, __FILE__, __LINE__))
-#else
#define MEMO_NEW(a, b, c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
-#endif
#define type_roomof(x, y) ((sizeof(x) + sizeof(y) - 1) / sizeof(y))
#define MEMO_FOR(type, value) ((type *)RARRAY_PTR(value))
@@ -1299,9 +1291,10 @@ void rb_gc_mark_values(long n, const VALUE *values);
#if IMEMO_DEBUG
VALUE rb_imemo_new_debug(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0, const char *file, int line);
-#endif
-
+#define rb_imemo_new(type, v1, v2, v3, v0) rb_imemo_new_debug(type, v1, v2, v3, v0, __FILE__, __LINE__)
+#else
VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
+#endif
RUBY_SYMBOL_EXPORT_END