summaryrefslogtreecommitdiff
path: root/pack.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-16 09:53:45 (GMT)
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-16 09:53:45 (GMT)
commitecabbf1bf606305bb553100700e1edb487604ecc (patch)
treeb9173748f7e09561c37c02efe9107d518b933266 /pack.c
parentfc3fbc143cc5ee95758b561a59d6b856c492bbb4 (diff)
* internal.h (INTEGER_PACK_2COMP): Defined.
(rb_integer_pack_2comp): Removed. * bignum.c (bary_pack): Support INTEGER_PACK_2COMP. (rb_integer_pack): Invoke bary_pack directly. (rb_integer_pack_2comp): Removed. (rb_integer_pack_internal): Ditto. (absint_numwords_generic): Follow the above change. * pack.c (pack_pack): Ditto. * sprintf.c (rb_str_format): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41336 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r--pack.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pack.c b/pack.c
index 6cc79a2..afb8d9c 100644
--- a/pack.c
+++ b/pack.c
@@ -799,8 +799,9 @@ pack_pack(VALUE ary, VALUE fmt)
char intbuf[MAX_INTEGER_PACK_SIZE];
from = NEXTFROM;
- rb_integer_pack_2comp(from, intbuf, integer_size, 1, 0,
- bigendian_p ? INTEGER_PACK_BIG_ENDIAN : INTEGER_PACK_LITTLE_ENDIAN);
+ rb_integer_pack(from, intbuf, integer_size, 1, 0,
+ INTEGER_PACK_2COMP |
+ (bigendian_p ? INTEGER_PACK_BIG_ENDIAN : INTEGER_PACK_LITTLE_ENDIAN));
rb_str_buf_cat(res, intbuf, integer_size);
}
break;