Changeset 31379 in project


Ignore:
Timestamp:
09/11/14 16:05:14 (5 years ago)
Author:
sjamaan
Message:

numbers: Fix problem caused by C_word overflow when using bignum negative predicate in integer context

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers-c.h

    r31376 r31379  
    175175#define C_bignum_header(b)              (*(C_word *)C_data_pointer(C_internal_bignum(b)))
    176176#define C_bignum_digits(b)              (((C_word *)C_data_pointer(C_internal_bignum(b)))+1)
    177 #define C_bignum_negativep(b)           (C_bignum_header(b) & C_BIGNUM_HEADER_SIGN_BIT)
     177#define C_bignum_negativep(b)           ((C_bignum_header(b) & C_BIGNUM_HEADER_SIGN_BIT) != 0)
    178178#define C_u_i_bignum_negativep(b)       C_mk_bool(C_bignum_negativep(b))
    179179#define C_u_i_bignum_oddp(b)            C_mk_bool(C_bignum_digits(b)[0] & 1)
Note: See TracChangeset for help on using the changeset viewer.