Project

General

Profile

Bug #8522 ยป bignum.c.bug8522.patch

drbrain (Eric Hodel), 06/13/2013 05:29 AM

View differences:

bignum.c (working copy)
1120 1120
}
1121 1121

  
1122 1122
static size_t
1123
integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
1123
integer_unpack_num_bdigits_small(size_t numwords, size_t wordsize, size_t nails, size_t *nlp_bits_ret)
1124 1124
{
1125 1125
    /* nlp_bits stands for number of leading padding bits */
1126 1126
    size_t num_bits = (wordsize * CHAR_BIT - nails) * numwords;
......
1130 1130
}
1131 1131

  
1132 1132
static size_t
1133
integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nails, int *nlp_bits_ret)
1133
integer_unpack_num_bdigits_generic(size_t numwords, size_t wordsize, size_t nails, size_t *nlp_bits_ret)
1134 1134
{
1135 1135
    /* BITSPERDIG = SIZEOF_BDIGITS * CHAR_BIT */
1136 1136
    /* num_bits = (wordsize * CHAR_BIT - nails) * numwords */
......
1202 1202
}
1203 1203

  
1204 1204
static VALUE
1205
rb_integer_unpack_internal(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, int *nlp_bits_ret)
1205
rb_integer_unpack_internal(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags, size_t *nlp_bits_ret)
1206 1206
{
1207 1207
    VALUE result;
1208 1208
    const unsigned char *buf = words;
......
1309 1309
VALUE
1310 1310
rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
1311 1311
{
1312
    int nlp_bits;
1312
    size_t nlp_bits;
1313 1313
    VALUE val;
1314 1314

  
1315 1315
    validate_integer_pack_format(numwords, wordsize, nails, flags,
......
1356 1356
rb_integer_unpack_2comp(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
1357 1357
{
1358 1358
    VALUE val;
1359
    int nlp_bits;
1359
    size_t nlp_bits;
1360 1360

  
1361 1361
    validate_integer_pack_format(numwords, wordsize, nails, flags,
1362 1362
            INTEGER_PACK_MSWORD_FIRST|