ruby-changes:1888
From: ko1@a...
Date: 7 Sep 2007 15:34:37 +0900
Subject: [ruby-changes:1888] shyouhei - Ruby:r13379 (ruby_1_8_6): * bignum.c (big_lshift): make shift offset long type.
shyouhei 2007-09-07 15:34:29 +0900 (Fri, 07 Sep 2007)
New Revision: 13379
Modified files:
branches/ruby_1_8_6/bignum.c
branches/ruby_1_8_6/version.h
Log:
* bignum.c (big_lshift): make shift offset long type.
(big_rshift): ditto.
(rb_big_lshift): ditto.
(big_rshift): ditto.
[ruby-dev:31434]
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/version.h?r1=13379&r2=13378
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8_6/bignum.c?r1=13379&r2=13378
Index: ruby_1_8_6/version.h
===================================================================
--- ruby_1_8_6/version.h (revision 13378)
+++ ruby_1_8_6/version.h (revision 13379)
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.6"
-#define RUBY_RELEASE_DATE "2007-08-22"
+#define RUBY_RELEASE_DATE "2007-09-07"
#define RUBY_VERSION_CODE 186
-#define RUBY_RELEASE_CODE 20070822
-#define RUBY_PATCHLEVEL 89
+#define RUBY_RELEASE_CODE 20070907
+#define RUBY_PATCHLEVEL 90
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 6
#define RUBY_RELEASE_YEAR 2007
-#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 22
+#define RUBY_RELEASE_MONTH 9
+#define RUBY_RELEASE_DAY 7
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];
Index: ruby_1_8_6/bignum.c
===================================================================
--- ruby_1_8_6/bignum.c (revision 13378)
+++ ruby_1_8_6/bignum.c (revision 13379)
@@ -1544,8 +1544,8 @@
return bignorm(z);
}
-static VALUE big_lshift _((VALUE, unsigned int));
-static VALUE big_rshift _((VALUE, unsigned int));
+static VALUE big_lshift _((VALUE, unsigned long));
+static VALUE big_rshift _((VALUE, unsigned long));
static VALUE big_shift(x, n)
VALUE x;
@@ -1884,11 +1884,12 @@
rb_big_lshift(x, y)
VALUE x, y;
{
- int shift, neg = 0;
+ long shift;
+ int neg = 0;
for (;;) {
if (FIXNUM_P(y)) {
- shift = FIX2INT(y);
+ shift = FIX2LONG(y);
if (shift < 0) {
neg = 1;
shift = -shift;
@@ -1914,10 +1915,10 @@
static VALUE
big_lshift(x, shift)
VALUE x;
- unsigned int shift;
+ unsigned long shift;
{
BDIGIT *xds, *zds;
- int s1 = shift/BITSPERDIG;
+ long s1 = shift/BITSPERDIG;
int s2 = shift%BITSPERDIG;
VALUE z;
BDIGIT_DBL num = 0;
@@ -1950,12 +1951,12 @@
rb_big_rshift(x, y)
VALUE x, y;
{
- int shift;
+ long shift;
int neg = 0;
for (;;) {
if (FIXNUM_P(y)) {
- shift = FIX2INT(y);
+ shift = FIX2LONG(y);
if (shift < 0) {
neg = 1;
shift = -shift;
@@ -1983,11 +1984,11 @@
static VALUE
big_rshift(x, shift)
VALUE x;
- unsigned int shift;
+ unsigned long shift;
{
BDIGIT *xds, *zds;
long s1 = shift/BITSPERDIG;
- long s2 = shift%BITSPERDIG;
+ int s2 = shift%BITSPERDIG;
VALUE z;
BDIGIT_DBL num = 0;
long i, j;
--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml