summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-08-09 04:32:24 +0000
commitc1bbe10599dfcc2dca3823dc0784eb1835c1ed74 (patch)
treecf8d2904f1e9ba1a42b0e68e59571e97c3695f2b /ruby.h
parenta3edeb5fec3dfb064a1745881f5c5ec68e2abc92 (diff)
matz
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@882 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/ruby.h b/ruby.h
index 11c429f..09f2190 100644
--- a/ruby.h
+++ b/ruby.h
@@ -217,13 +217,12 @@ char *rb_str2cstr _((VALUE,int*));
VALUE rb_newobj _((void));
#define NEWOBJ(obj,type) type *obj = (type*)rb_newobj()
#define OBJSETUP(obj,c,t) {\
- RBASIC(obj)->klass = (c);\
RBASIC(obj)->flags = (t);\
+ RBASIC(obj)->klass = (c);\
if (rb_safe_level() >= 3) FL_SET(obj, FL_TAINT);\
}
#define CLONESETUP(clone,obj) do {\
- RBASIC(clone)->flags = (RBASIC(obj)->flags);\
- RBASIC(obj)->klass = (rb_singleton_class_clone(RBASIC(obj)->klass));\
+ OBJSETUP(clone,rb_singleton_class_clone(RBASIC(obj)->klass),RBASIC(obj)->flags);\
rb_singleton_class_attached(RBASIC(clone)->klass, (VALUE)clone);\
if (FL_TEST(obj, FL_EXIVAR)) rb_clone_generic_ivar((VALUE)clone,(VALUE)obj);\
} while (0)