ruby-changes:20503
From: mrkn <ko1@a...>
Date: Fri, 15 Jul 2011 19:16:51 +0900 (JST)
Subject: [ruby-changes:20503] mrkn:r32551 (trunk): * bignum.c (bigsub_int): add RB_GC_GUARD. This patch is made by
mrkn 2011-07-15 19:16:41 +0900 (Fri, 15 Jul 2011) New Revision: 32551 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=32551 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: trunk/ChangeLog trunk/bignum.c Index: ChangeLog =================================================================== --- ChangeLog (revision 32550) +++ ChangeLog (revision 32551) @@ -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 14:27:53 2011 NAKAMURA Usaku <usa@r...> * win32/win32.c, include/ruby/win32.h (rb_w32_io_cancelable_p): renamed Index: bignum.c =================================================================== --- bignum.c (revision 32550) +++ bignum.c (revision 32551) @@ -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/