aboutsummaryrefslogtreecommitdiffstats
path: root/gc.c
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-04 13:31:47 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-11-04 13:31:47 +0000
commit4a6a52ecc4ac00a73929a11d385eb3e7b4062301 (patch)
tree0f0bcb7c4982474b8a05cd1e3d1049e2a1df828b /gc.c
parentb9f85dd7fae8ce328e2a3510cc3c864b6e887b79 (diff)
downloadruby-4a6a52ecc4ac00a73929a11d385eb3e7b4062301.tar.gz
gc.c (rb_free_tmp_buffer): stop accessing imemo_alloc as NODE
The fields of imemo_alloc were accessed via RNODE() cast, since the imemo was NODE_ALLOCA traditionally. This was refactored at r60239, so now the fields should be accessed as imemo_alloc. This prevented change of NODE structure. Yuichiro Kaneko pointed out this inconsistency. Thanks! git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'gc.c')
-rw-r--r--gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gc.c b/gc.c
index e2c5714fa2..e79a09945e 100644
--- a/gc.c
+++ b/gc.c
@@ -8143,10 +8143,10 @@ rb_alloc_tmp_buffer(volatile VALUE *store, long len)
void
rb_free_tmp_buffer(volatile VALUE *store)
{
- VALUE s = ATOMIC_VALUE_EXCHANGE(*store, 0);
+ rb_imemo_alloc_t *s = (rb_imemo_alloc_t*)ATOMIC_VALUE_EXCHANGE(*store, 0);
if (s) {
- void *ptr = ATOMIC_PTR_EXCHANGE(RNODE(s)->u1.node, 0);
- RNODE(s)->u3.cnt = 0;
+ void *ptr = ATOMIC_PTR_EXCHANGE(s->ptr, 0);
+ s->cnt = 0;
ruby_xfree(ptr);
}
}