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

@ -32,7 +32,8 @@ scm_bignum (SCM x)
return (struct scm_bignum *) SCM_UNPACK (x);
}
SCM_INTERNAL SCM scm_integer_from_mpz (mpz_srcptr mpz);
SCM_INTERNAL SCM scm_integer_from_mpz (const mpz_t n);
SCM_INTERNAL void scm_integer_to_mpz_z (struct scm_bignum *z, mpz_t n);
SCM_INTERNAL int scm_is_integer_odd_i (scm_t_inum i);
SCM_INTERNAL int scm_is_integer_odd_z (struct scm_bignum *z);