From 18717ec72e3ca1cf33ba62d949b629c43dbd9dbe Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 25 Feb 2008 16:18:18 +0000 Subject: * include/ruby/ruby.h (ROBJECT_NUMIV): renamed from ROBJECT_LEN. (ROBJECT_IVPTR): renamed from ROBJECT_PTR. * variable.c: follow the above renaming. * object.c: ditto. * gc.c: ditto. * marshal.c: ditto. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@15604 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- object.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'object.c') diff --git a/object.c b/object.c index 5b2715b79..2dc87610d 100644 --- a/object.c +++ b/object.c @@ -166,10 +166,10 @@ init_copy(VALUE dest, VALUE obj) rb_gc_copy_finalizer(dest, obj); switch (TYPE(obj)) { case T_OBJECT: - if (!(RBASIC(dest)->flags & ROBJECT_EMBED) && ROBJECT_PTR(dest)) { - xfree(ROBJECT_PTR(dest)); - ROBJECT(dest)->as.heap.ptr = 0; - ROBJECT(dest)->as.heap.len = 0; + if (!(RBASIC(dest)->flags & ROBJECT_EMBED) && ROBJECT_IVPTR(dest)) { + xfree(ROBJECT_IVPTR(dest)); + ROBJECT(dest)->as.heap.ivptr = 0; + ROBJECT(dest)->as.heap.numiv = 0; ROBJECT(dest)->as.heap.iv_index_tbl = 0; } if (RBASIC(obj)->flags & ROBJECT_EMBED) { @@ -177,11 +177,11 @@ init_copy(VALUE dest, VALUE obj) RBASIC(dest)->flags |= ROBJECT_EMBED; } else { - long len = ROBJECT(obj)->as.heap.len; + long len = ROBJECT(obj)->as.heap.numiv; VALUE *ptr = ALLOC_N(VALUE, len); - MEMCPY(ptr, ROBJECT(obj)->as.heap.ptr, VALUE, len); - ROBJECT(dest)->as.heap.ptr = ptr; - ROBJECT(dest)->as.heap.len = len; + MEMCPY(ptr, ROBJECT(obj)->as.heap.ivptr, VALUE, len); + ROBJECT(dest)->as.heap.ivptr = ptr; + ROBJECT(dest)->as.heap.numiv = len; ROBJECT(dest)->as.heap.iv_index_tbl = ROBJECT(obj)->as.heap.iv_index_tbl; RBASIC(dest)->flags &= ~ROBJECT_EMBED; } @@ -374,8 +374,8 @@ rb_obj_inspect(VALUE obj) if (TYPE(obj) == T_OBJECT) { int has_ivar = 0; - VALUE *ptr = ROBJECT_PTR(obj); - long len = ROBJECT_LEN(obj); + VALUE *ptr = ROBJECT_IVPTR(obj); + long len = ROBJECT_NUMIV(obj); long i; for (i = 0; i < len; i++) { -- cgit