From a9191c44cac2b759acd1e10ca86924b25c5d44fc Mon Sep 17 00:00:00 2001 From: matz Date: Sat, 28 Aug 2004 14:20:44 +0000 Subject: * bignum.c (rb_big_and): protect parameters from GC. [ruby-talk:110664] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@6828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- bignum.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'bignum.c') diff --git a/bignum.c b/bignum.c index 35b79d8877..d674e68298 100644 --- a/bignum.c +++ b/bignum.c @@ -1622,15 +1622,16 @@ rb_big_pow(x, y) */ VALUE -rb_big_and(x, y) - VALUE x, y; +rb_big_and(xx, yy) + VALUE xx, yy; { - VALUE z; + volatile VALUE x, y, z; BDIGIT *ds1, *ds2, *zds; long i, l1, l2; char sign; - y = rb_to_int(y); + x = xx; + y = rb_to_int(yy); if (FIXNUM_P(y)) { y = rb_int2big(FIX2LONG(y)); } @@ -1677,15 +1678,16 @@ rb_big_and(x, y) */ VALUE -rb_big_or(x, y) - VALUE x, y; +rb_big_or(xx, yy) + VALUE xx, yy; { - VALUE z; + volatile VALUE x, y, z; BDIGIT *ds1, *ds2, *zds; long i, l1, l2; char sign; - y = rb_to_int(y); + x = xx; + y = rb_to_int(yy); if (FIXNUM_P(y)) { y = rb_int2big(FIX2LONG(y)); } -- cgit v1.2.3