From e3215a73423bdfca2ee2a2cae45a616296f0f605 Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 24 Dec 2007 18:12:24 +0000 Subject: * 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 --- pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pack.c') 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"); } -- cgit v1.2.3