aboutsummaryrefslogtreecommitdiffstats
path: root/pack.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 18:12:24 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-12-24 18:12:24 +0000
commite3215a73423bdfca2ee2a2cae45a616296f0f605 (patch)
tree9ab7ee75fdacc3dc0f78ff5aa3335b6de6aa6436 /pack.c
parent8f5b0a4cd4decba7a56d1acb9601db47d2935ec0 (diff)
downloadruby-e3215a73423bdfca2ee2a2cae45a616296f0f605.tar.gz
* pack.c (pack_pack): use NUM2LONG instead of NUM2INT.
* numeric.c (fix_lshift, fix_aref): use SIZEOF_LONG instead of SIZEOF_VALUE. * bignum.c (big2ulong, rb_big_aref): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14625 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index f9a907196f..0df3c567ed 100644
--- a/pack.c
+++ b/pack.c
@@ -861,13 +861,13 @@ pack_pack(VALUE ary, VALUE fmt)
case 'U': /* Unicode character */
while (len-- > 0) {
- long l;
+ SIGNED_VALUE l;
char buf[8];
int le;
from = NEXTFROM;
from = rb_to_int(from);
- l = NUM2INT(from);
+ l = NUM2LONG(from);
if (l < 0) {
rb_raise(rb_eRangeError, "pack(U): value out of range");
}