1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

scm_to_mpz uses integer lib

* libguile/integers.h:
* libguile/integers.c (scm_integer_to_mpz_z): New internal function.
* libguile/numbers.c (scm_to_mpz): Use new function.
This commit is contained in:
Andy Wingo 2022-01-06 21:47:20 +01:00
parent debcccc215
commit 9a91c20a55
3 changed files with 12 additions and 2 deletions

View file

@ -7090,7 +7090,7 @@ scm_to_mpz (SCM val, mpz_t rop)
if (SCM_I_INUMP (val))
mpz_set_si (rop, SCM_I_INUM (val));
else if (SCM_BIGP (val))
mpz_set (rop, SCM_I_BIG_MPZ (val));
scm_integer_to_mpz_z (scm_bignum (val), rop);
else
scm_wrong_type_arg_msg (NULL, 0, val, "exact integer");
}