[前][次][番号順一覧][スレッド一覧]

ruby-changes:51156

From: shyouhei <ko1@a...>
Date: Wed, 9 May 2018 11:42:26 +0900 (JST)
Subject: [ruby-changes:51156] shyouhei:r63363 (trunk): revert r63362 due to test failure. Sorry!

shyouhei	2018-05-09 11:42:22 +0900 (Wed, 09 May 2018)

  New Revision: 63363

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=63363

  Log:
    revert r63362 due to test failure. Sorry!

  Modified files:
    trunk/iseq.h
Index: iseq.h
===================================================================
--- iseq.h	(revision 63362)
+++ iseq.h	(revision 63363)
@@ -46,25 +46,23 @@ ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t https://github.com/ruby/ruby/blob/trunk/iseq.h#L46
 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  | \

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]