summaryrefslogtreecommitdiff
path: root/iseq.h
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-09 02:42:22 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-09 02:42:22 +0000
commitdfc56b8c432d6a374c18cba7048d05175bcfba05 (patch)
tree83b80bccbb86751ba75e0b6b3ab33524f1e82a6c /iseq.h
parent7079db9ec5acef3321e92c32d7ef086d8d16d720 (diff)
revert r63362 due to test failure. Sorry!
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63363 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'iseq.h')
-rw-r--r--iseq.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/iseq.h b/iseq.h
index aad9bdd..de8beff 100644
--- a/iseq.h
+++ b/iseq.h
@@ -46,25 +46,23 @@ ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
static inline VALUE *
ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
{
- rb_imemo_alloc_t *str = (void *)iseq->body->variable.original_iseq;
- if (RTEST(str)) return str->ptr;
+ VALUE str = iseq->body->variable.original_iseq;
+ if (RTEST(str)) return (VALUE *)RSTRING_PTR(str);
return NULL;
}
static inline void
ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
{
- rb_free_tmp_buffer(&iseq->body->variable.original_iseq);
- RB_OBJ_WRITE(iseq, &iseq->body->variable.original_iseq, Qfalse);
+ RB_OBJ_WRITE(iseq, &iseq->body->variable.original_iseq, Qnil);
}
static inline VALUE *
ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
{
- VALUE str;
- VALUE *ptr = rb_alloc_tmp_buffer_with_count(&str, sizeof(VALUE), size);
+ VALUE str = rb_str_tmp_new(size * sizeof(VALUE));
RB_OBJ_WRITE(iseq, &iseq->body->variable.original_iseq, str);
- return ptr;
+ return (VALUE *)RSTRING_PTR(str);
}
#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | \