on master help sign in
Use the gmp API

Instead of using the data structure directly.

commitd777aa2a0c160d33b6c81a627158a0854060e452 authorNiklas Larsson <niklas@mm.st> dateSun 1 Oct 2017, 00:57 (9 years ago) parente52318c
1 file changed+2−2
rts/idris_gmp.c+2−2
rts/idris_gmp.c+2−2
@@ -501,8 +501,8 @@ uint64_t idris_truncBigB64(const mpz_t bi) {
501501 return mpz_get_ui(bi);
502502 }
503503 int64_t out = mpz_get_ui(bi);
504− if (bi->_mp_size > 1 ) {
505− out |= (uint64_t)bi->_mp_d[1] << 32;
504+ if (mpz_size(bi) > 1) {
505+ out |= mpz_getlimbn(bi, 1) << 32;
506506 }
507507 return out;
508508}