summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-28 14:14:11 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-08-28 14:14:11 +0000
commit88ba175ab0c87882e446a5290ddc84880310d6d3 (patch)
tree09692f360f32ef7d36ba22a4008a9455829343d7 /bignum.c
parent55bf54a9c062b30492b328345ab3c68449e3f676 (diff)
* bignum.c (rb_big_and): protect parameters from GC.
[ruby-talk:110664] * error.c (exc_equal): exceptions are equal if they share same class, message and backtrace. [ruby-talk:110354] * error.c (name_err_mesg_equal): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/bignum.c b/bignum.c
index 510860c03c..5f008544c0 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1638,15 +1638,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));
}
@@ -1693,15 +1694,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));
}