ruby-changes:20504
From: mrkn <ko1@a...>
Date: Fri, 15 Jul 2011 20:27:35 +0900 (JST)
Subject: [ruby-changes:20504] mrkn:r32552 (ruby_1_9_3): * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
mrkn 2011-07-15 20:27:24 +0900 (Fri, 15 Jul 2011) New Revision: 32552 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32552 Log: * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by Makoto Kishimoto. fixes #4223 [ruby-dev:42907] * bignum.c (bigadd_int): ditto. Modified files: branches/ruby_1_9_3/ChangeLog branches/ruby_1_9_3/bignum.c Index: ruby_1_9_3/ChangeLog =================================================================== --- ruby_1_9_3/ChangeLog (revision 32551) +++ ruby_1_9_3/ChangeLog (revision 32552) @@ -1,3 +1,10 @@ +Fri Jul 15 19:11:00 2011 Kenta Murata <mrkn@m...> + + * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by + Makoto Kishimoto. fixes #4223 [ruby-dev:42907] + + * bignum.c (bigadd_int): ditto. + Fri Jul 15 09:59:12 2011 Hiroshi Nakamura <nahi@r...> * backport r32546 from trunk. Index: ruby_1_9_3/bignum.c =================================================================== --- ruby_1_9_3/bignum.c (revision 32551) +++ ruby_1_9_3/bignum.c (revision 32552) @@ -1767,6 +1767,7 @@ if (xn == 1 && num < 0) { RBIGNUM_SET_SIGN(z, !RBIGNUM_SIGN(x)); zds[0] = (BDIGIT)-num; + RB_GC_GUARD(x); return bignorm(z); } zds[0] = BIGLO(num); @@ -1793,6 +1794,7 @@ if (num < 0) { z = bigsub(x, rb_int2big(y0)); } + RB_GC_GUARD(x); return bignorm(z); } @@ -1845,6 +1847,7 @@ while (i < zn) { zds[i++] = 0; } + RB_GC_GUARD(x); return bignorm(z); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/