diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-16 09:53:45 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-16 09:53:45 +0000 |
commit | ecabbf1bf606305bb553100700e1edb487604ecc (patch) | |
tree | b9173748f7e09561c37c02efe9107d518b933266 /pack.c | |
parent | fc3fbc143cc5ee95758b561a59d6b856c492bbb4 (diff) | |
download | ruby-ecabbf1bf606305bb553100700e1edb487604ecc.tar.gz |
* 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.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |