From c3a46d6acab5ab063cc6b5808c2b344f110bef12 Mon Sep 17 00:00:00 2001 From: nari Date: Sat, 20 Oct 2012 06:57:51 +0000 Subject: * include/ruby/ruby.h: add C APIs. VALUE rb_newobj_of(VALUE klass, VALUE flags) #define NEWOBJ_OF(obj,type,klass,flags) These allow to change a allocation strategy depending on klass or flags. * gc.c: ditto * array.c: use new C API. * bignum.c: ditto * class.c: ditto * complex.c: ditto * ext/socket/ancdata.c: ditto * ext/socket/option.c: ditto * hash.c: ditto * io.c: ditto * marshal.c: ditto * numeric.c: ditto * object.c: ditto * random.c: ditto * range.c: ditto * rational.c: ditto * re.c: ditto * string.c: ditto * struct.c: ditto [Feature #7177][Feature #7047] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index 6fb031e198..685f9b80c1 100644 --- a/bignum.c +++ b/bignum.c @@ -166,8 +166,7 @@ rb_big_resize(VALUE big, long len) static VALUE bignew_1(VALUE klass, long len, int sign) { - NEWOBJ(big, struct RBignum); - OBJSETUP(big, klass, T_BIGNUM); + NEWOBJ_OF(big, struct RBignum, klass, T_BIGNUM); RBIGNUM_SET_SIGN(big, sign?1:0); if (len <= RBIGNUM_EMBED_LEN_MAX) { RBASIC(big)->flags |= RBIGNUM_EMBED_FLAG; -- cgit v1.2.3