diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/-test-/bignum/pack.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/-test-/bignum/pack.c b/ext/-test-/bignum/pack.c index 8634e1e971..62f8f62c2d 100644 --- a/ext/-test-/bignum/pack.c +++ b/ext/-test-/bignum/pack.c @@ -6,17 +6,16 @@ rb_integer_pack_m(VALUE val, VALUE buf, VALUE wordsize_arg, VALUE nails, VALUE f { int sign; size_t count = 0; - void *ret; size_t wordsize = NUM2SIZET(wordsize_arg); StringValue(buf); rb_str_modify(buf); count = wordsize == 0 ? 0 : RSTRING_LEN(buf) / wordsize; - ret = rb_integer_pack(val, - &sign, RSTRING_PTR(buf), count, + sign = rb_integer_pack(val, + RSTRING_PTR(buf), count, wordsize, NUM2SIZET(nails), NUM2INT(flags)); - return rb_ary_new_from_args(3, INT2NUM(sign), ret ? rb_str_new(ret, wordsize * count) : Qnil, SIZET2NUM(count)); + return rb_ary_new_from_args(3, INT2NUM(sign), rb_str_new(RSTRING_PTR(buf), wordsize * count), SIZET2NUM(count)); } static VALUE |