summaryrefslogtreecommitdiff
path: root/ext/-test-
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-16 12:59:26 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-16 12:59:26 +0000
commit50794b32227e0615a8468f8203e12d180b57442c (patch)
tree0712afabc1cc64d14cd216f7f36e2e61842ee5cd /ext/-test-
parentecabbf1bf606305bb553100700e1edb487604ecc (diff)
downloadruby-50794b32227e0615a8468f8203e12d180b57442c.tar.gz
* bignum.c (bary_2comp): Extracted from get2comp.
(integer_unpack_num_bdigits): Extracted from rb_integer_unpack_internal. (bary_unpack_internal): Renamed from bary_unpack and support INTEGER_PACK_2COMP. (bary_unpack): New function to validate arguments and invoke bary_unpack_internal. (rb_integer_unpack_internal): Removed. (rb_integer_unpack): Invoke bary_unpack_internal. (rb_integer_unpack_2comp): Removed. * internal.h (rb_integer_unpack_2comp): Removed. * pack.c: Follow the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41337 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/-test-')
-rw-r--r--ext/-test-/bignum/pack.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/ext/-test-/bignum/pack.c b/ext/-test-/bignum/pack.c
index f95c932670..f54e706884 100644
--- a/ext/-test-/bignum/pack.c
+++ b/ext/-test-/bignum/pack.c
@@ -45,23 +45,12 @@ rb_integer_unpack_m(VALUE klass, VALUE buf, VALUE numwords, VALUE wordsize, VALU
NUM2SIZET(nails), NUM2INT(flags));
}
-static VALUE
-rb_integer_unpack_2comp_m(VALUE klass, VALUE buf, VALUE numwords, VALUE wordsize, VALUE nails, VALUE flags)
-{
- StringValue(buf);
-
- return rb_integer_unpack_2comp(RSTRING_PTR(buf),
- NUM2SIZET(numwords), NUM2SIZET(wordsize),
- NUM2SIZET(nails), NUM2INT(flags));
-}
-
void
Init_pack(VALUE klass)
{
rb_define_method(rb_cInteger, "test_pack_raw", rb_integer_pack_raw_m, 5);
rb_define_method(rb_cInteger, "test_pack", rb_integer_pack_m, 4);
rb_define_singleton_method(rb_cInteger, "test_unpack", rb_integer_unpack_m, 5);
- rb_define_singleton_method(rb_cInteger, "test_unpack_2comp", rb_integer_unpack_2comp_m, 5);
rb_define_const(rb_cInteger, "INTEGER_PACK_MSWORD_FIRST", INT2NUM(INTEGER_PACK_MSWORD_FIRST));
rb_define_const(rb_cInteger, "INTEGER_PACK_LSWORD_FIRST", INT2NUM(INTEGER_PACK_LSWORD_FIRST));
rb_define_const(rb_cInteger, "INTEGER_PACK_MSBYTE_FIRST", INT2NUM(INTEGER_PACK_MSBYTE_FIRST));