diff options
| author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 11:40:52 +0000 |
|---|---|---|
| committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2007-12-19 11:40:52 +0000 |
| commit | 08edce3cbcebf888871c595deb36cdd435aa06d6 (patch) | |
| tree | cefe60a331837756fefdca63f6a988b9683309f4 | |
| parent | 86a5c2befadf02c72e362d7aa6f959cdba9a57b0 (diff) | |
| download | ruby-08edce3cbcebf888871c595deb36cdd435aa06d6.tar.gz ruby-08edce3cbcebf888871c595deb36cdd435aa06d6.tar.xz ruby-08edce3cbcebf888871c595deb36cdd435aa06d6.zip | |
* bignum.c (bigmul1): C99ism.
* bignum.c (bigdivrem1): need dummy return value.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14331 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | bignum.c | 8 |
2 files changed, 11 insertions, 3 deletions
@@ -1,3 +1,9 @@ +Wed Dec 19 20:40:01 2007 NAKAMURA Usaku <usa@ruby-lang.org> + + * bignum.c (bigmul1): C99ism. + + * bignum.c (bigdivrem1): need dummy return value. + Wed Dec 19 19:18:06 2007 NARUSE, Yui <naruse@ruby-lang.org> * ext/nkf/nkf-utf8/nkf.c: Updated. @@ -1467,8 +1467,9 @@ bigmul1(void *ptr) zds = BDIGITS(z); while (j--) zds[j] = 0; for (i = 0; i < RBIGNUM_LEN(x); i++) { + BDIGIT_DBL dd; if (bms->stop) return Qnil; - BDIGIT_DBL dd = BDIGITS(x)[i]; + dd = BDIGITS(x)[i]; if (dd == 0) continue; n = 0; for (j = 0; j < RBIGNUM_LEN(y); j++) { @@ -1555,7 +1556,7 @@ bigdivrem1(void *ptr) if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) { if (divp) *divp = rb_int2big(0); if (modp) *modp = x; - return; + return Qnil; } xds = BDIGITS(x); if (ny == 1) { @@ -1574,7 +1575,7 @@ bigdivrem1(void *ptr) RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x)); } if (divp) *divp = z; - return; + return Qnil; } z = bignew(nx==ny?nx+2:nx+1, RBIGNUM_SIGN(x)==RBIGNUM_SIGN(y)); zds = BDIGITS(z); @@ -1666,6 +1667,7 @@ bigdivrem1(void *ptr) RBIGNUM_SET_LEN(*modp, ny); RBIGNUM_SET_SIGN(*modp, RBIGNUM_SIGN(x)); } + return Qnil; } static VALUE |
