Changeset 30582 in project for release/4/numbers/trunk/numbers-c.h


Ignore:
Timestamp:
03/18/14 21:27:15 (7 years ago)
Author:
sjamaan
Message:

numbers: Minor simplification by cutting out the ability to turn off assertion checks specifically for bignums. Remove ancient constants BIG_FREE and FORCE_FINALIZERS (which go all the way back to the gmp implementation)

File:
1 edited

Legend:

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

    r26420 r30582  
    1414#define RAT_TAG       1
    1515#define COMP_TAG      2
    16 
    17 #define BIG_FREE      3
    18 
    19 #define FORCE_FINALIZERS     4
    2016
    2117enum bignum_bitwise_ops
     
    158154#define BIGNUM_BITS_TO_DIGITS(n)                                        \
    159155  (((n) + (BIGNUM_DIGIT_LENGTH - 1)) / BIGNUM_DIGIT_LENGTH)
    160 
    161 #ifndef BIGNUM_DISABLE_ASSERTION_CHECKS
    162 
    163 #define BIGNUM_EXCEPTION abort
    164 
    165 #define BIGNUM_ASSERT(expression)                                       \
    166 {                                                                       \
    167   if (! (expression))                                                   \
    168     BIGNUM_EXCEPTION ();                                                \
    169 }
    170 
    171 #else
    172 
    173 #define BIGNUM_ASSERT(expression)
    174 
    175 #endif /* BIGNUM_DISABLE_ASSERTION_CHECKS */
    176 
    177 /* Chicken-specific */
    178 #define BIGNUM_FITS_IN_FIXNUM_P(b)                                      \
    179   ((BIGNUM_LENGTH(b)) == 0 || (BIGNUM_LENGTH(b)) == 1 && BIGNUM_REF())
Note: See TracChangeset for help on using the changeset viewer.