Bug #8522 ยป bignum.c.bug8522.patch
bignum.c (working copy) | ||
---|---|---|
}
|
||
static size_t
|
||
integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
|
||
integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails, size_t *nlp_bits_ret)
|
||
{
|
||
/* nlp_bits stands for number of leading padding bits */
|
||
size_t num_bits = (wordsize * CHAR_BIT - nails) * numwords;
|
||
... | ... | |
}
|
||
static size_t
|
||
integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
|
||
integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nails, size_t *nlp_bits_ret)
|
||
{
|
||
/* BITSPERDIG = SIZEOF_BDIGITS * CHAR_BIT */
|
||
/* num_bits = (wordsize * CHAR_BIT - nails) * numwords */
|
||
... | ... | |
}
|
||
static VALUE
|
||
rb_integer_unpack_internal(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, int *nlp_bits_ret)
|
||
rb_integer_unpack_internal(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, size_t *nlp_bits_ret)
|
||
{
|
||
VALUE result;
|
||
const unsigned char *buf = words;
|
||
... | ... | |
VALUE
|
||
rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
|
||
{
|
||
int nlp_bits;
|
||
size_t nlp_bits;
|
||
VALUE val;
|
||
validate_integer_pack_format(numwords, wordsize, nails, flags,
|
||
... | ... | |
rb_integer_unpack_2comp(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
|
||
{
|
||
VALUE val;
|
||
int nlp_bits;
|
||
size_t nlp_bits;
|
||
validate_integer_pack_format(numwords, wordsize, nails, flags,
|
||
INTEGER_PACK_MSWORD_FIRST|
|