* bignum.c (rb_integer_unpack_2comp): New function.
  (rb_integer_unpack_internal): Extracted from rb_integer_unpack and
  nlp_bits_ret argument added.
  (integer_unpack_num_bdigits_small): nlp_bits_ret argument added to
  return number of leading padding bits.
  (integer_unpack_num_bdigits_generic): Ditto.

* internal.h (rb_integer_unpack_2comp): Declared.

* pack.c (pack_unpack): Use rb_integer_unpack_2comp and
  rb_integer_unpack.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 2013-06-13

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e