Branch: Tag:

2017-05-09

2017-05-09 12:05:34 by Henrik Grubbström (Grubba) <grubba@grubba.org>

CritBit: Avoid using gmp APIs directly.

Potential fix for module linking issues on NT (missing mpz_cmp).

37:   #define CB_GC_CHECK_KEY(key) gc_check((key).str)   #define CB_GC_RECURSE_KEY(key) gc_recurse_object((key).str)    - // int mpz_cmp (mpz_t op1, mpz_t op2) - #define CB_KEY_EQ(k1, k2) ( (k1).str == (k2).str || !mpz_cmp(K2G(k1), K2G(k2)) ) - #define CB_KEY_LT(k1, k2) ( (k1).str != (k2).str && mpz_cmp(K2G(k1), K2G(k2)) < 0 ) + // int low_compare_bignums (MP_INT op1, MP_INT op2) + #define CB_KEY_EQ(k1, k2) ( (k1).str == (k2).str || !low_compare_bignums(K2G(k1), K2G(k2)) ) + #define CB_KEY_LT(k1, k2) ( (k1).str != (k2).str && low_compare_bignums(K2G(k1), K2G(k2)) < 0 )      static inline mp_limb_t CB_GET_CHAR(cb_string s, ptrdiff_t n) {    MP_INT * i = O2G(s);