summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-01 08:53:44 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-11-01 08:53:44 +0000
commitc39797e8724683e91618168bd993ac467b81eda8 (patch)
tree25bfba803716b7301a047bc579788bd8998cc29d /hash.c
parentdcd0346265bfd346133e75c701b97fcb31c0ae6d (diff)
introduce USE_TRANSIENT_HEAP to enable/disable theap.
* include/ruby/ruby.h: intrdocue `USE_TRANSIENT_HEAP` macro to enable/disable transient heap. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hash.c b/hash.c
index 7bf5e11..b92e17c 100644
--- a/hash.c
+++ b/hash.c
@@ -499,8 +499,6 @@ hash_array_set(VALUE hash, struct li_table *li)
#define RHASH_SET_ST_FLAG(h) FL_SET_RAW(h, RHASH_ST_TABLE_FLAG)
#define RHASH_UNSET_ST_FLAG(h) FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG)
-#define RHASH_SET_TRANSIENT_FLAG(h) FL_SET_RAW(h, RHASH_TRANSIENT_FLAG)
-#define RHASH_UNSET_TRANSIENT_FLAG(h) FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG)
#define RHASH_ARRAY_BOUND_SET(h, n) do { \
long tmp_n = n; \
@@ -1030,6 +1028,7 @@ linear_clear(VALUE hash)
}
}
+#if USE_TRANSIENT_HEAP
void
rb_hash_transient_heap_evacuate(VALUE hash, int promote)
{
@@ -1056,7 +1055,7 @@ rb_hash_transient_heap_evacuate(VALUE hash, int promote)
}
hash_verify(hash);
}
-
+#endif
typedef int st_foreach_func(st_data_t, st_data_t, st_data_t);