mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* bignum.c (rb_big_rshift): fix a GC problem on
IA64 with gcc 4.0.3 20051216 (prerelease). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9705 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3ab3b5b3c8
commit
de85bb0efe
2 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
Sat Dec 17 03:57:01 2005 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
|
* bignum.c (rb_big_rshift): fix a GC problem on
|
||||||
|
IA64 with gcc 4.0.3 20051216 (prerelease).
|
||||||
|
|
||||||
Sat Dec 17 03:30:23 2005 Tanaka Akira <akr@m17n.org>
|
Sat Dec 17 03:30:23 2005 Tanaka Akira <akr@m17n.org>
|
||||||
|
|
||||||
* eval.c (bmcall): fix a GC problem by tail call on
|
* eval.c (bmcall): fix a GC problem by tail call on
|
||||||
|
|
3
bignum.c
3
bignum.c
|
@ -1793,6 +1793,7 @@ rb_big_rshift(VALUE x, VALUE y)
|
||||||
VALUE z;
|
VALUE z;
|
||||||
BDIGIT_DBL num = 0;
|
BDIGIT_DBL num = 0;
|
||||||
long i, j;
|
long i, j;
|
||||||
|
volatile VALUE save_x;
|
||||||
|
|
||||||
if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
|
if (shift < 0) return rb_big_lshift(x, INT2FIX(-shift));
|
||||||
|
|
||||||
|
@ -1803,7 +1804,7 @@ rb_big_rshift(VALUE x, VALUE y)
|
||||||
return INT2FIX(-1);
|
return INT2FIX(-1);
|
||||||
}
|
}
|
||||||
if (!RBIGNUM(x)->sign) {
|
if (!RBIGNUM(x)->sign) {
|
||||||
x = rb_big_clone(x);
|
save_x = x = rb_big_clone(x);
|
||||||
get2comp(x);
|
get2comp(x);
|
||||||
}
|
}
|
||||||
xds = BDIGITS(x);
|
xds = BDIGITS(x);
|
||||||
|
|
Loading…
Reference in a new issue