summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 04:53:13 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-09-07 04:53:13 +0000
commitc7a84b8c11792d6d71ff4ece5cc9df43fbddafcd (patch)
tree41f7560ad18fa121926b63346112338da8661014
parent69a3a92be9d8143e8102c1ec3e87c01193712524 (diff)
* bignum.c (big_lshift): make shift offset long type.
(big_rshift): ditto. (rb_big_lshift): ditto. (big_rshift): ditto. [ruby-dev:31434] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_5@13355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog8
-rw-r--r--bignum.c21
-rw-r--r--version.h10
3 files changed, 24 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 38109f0d5a..602663b5fa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+Fri Sep 7 13:52:36 2007 Tanaka Akira <akr@fsij.org>
+
+ * bignum.c (big_lshift): make shift offset long type.
+ (big_rshift): ditto.
+ (rb_big_lshift): ditto.
+ (big_rshift): ditto.
+ [ruby-dev:31434]
+
Thu Aug 16 08:44:55 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
* hash.c (rb_hash_delete_key): delete the entry without calling block.
diff --git a/bignum.c b/bignum.c
index 17c05c0ceb..cbcea24818 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1509,8 +1509,8 @@ rb_big_remainder(x, y)
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;
@@ -1847,11 +1847,12 @@ VALUE
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;
@@ -1877,10 +1878,10 @@ rb_big_lshift(x, y)
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;
@@ -1913,12 +1914,12 @@ VALUE
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;
@@ -1946,11 +1947,11 @@ rb_big_rshift(x, y)
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;
diff --git a/version.h b/version.h
index 2778a8e81e..7d16d40ff1 100644
--- a/version.h
+++ b/version.h
@@ -1,15 +1,15 @@
#define RUBY_VERSION "1.8.5"
-#define RUBY_RELEASE_DATE "2007-08-16"
+#define RUBY_RELEASE_DATE "2007-09-07"
#define RUBY_VERSION_CODE 185
-#define RUBY_RELEASE_CODE 20070816
-#define RUBY_PATCHLEVEL 97
+#define RUBY_RELEASE_CODE 20070907
+#define RUBY_PATCHLEVEL 98
#define RUBY_VERSION_MAJOR 1
#define RUBY_VERSION_MINOR 8
#define RUBY_VERSION_TEENY 5
#define RUBY_RELEASE_YEAR 2007
-#define RUBY_RELEASE_MONTH 8
-#define RUBY_RELEASE_DAY 16
+#define RUBY_RELEASE_MONTH 9
+#define RUBY_RELEASE_DAY 7
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];