Subject: bug#10519: guile and (mini-)gmp

From: [email-masked] (Ludovic Courtès)
Date: Sun, 22 Jul 2012 11:00:28 +0200

Hello!

Reviving the discussion, as we’ve been discussing this at the GHM, and
some people would really like to see it happen.  :-)

[email-masked] (Niels Möller) skribis:

> To try that out, I'm working with a slightly patched guile:

Do you still have the patch around?

> 1. The header file libguile.h. As far as I understand, this is a public
>    header file and it's use of <gmp.h> means that the public guile ABI
>    depends on gmp.

The problem is that there’s a public API dealing with mpz_t:

  SCM_API void scm_to_mpz (SCM x, mpz_t rop);
  SCM_API SCM  scm_from_mpz (mpz_t rop);

So, when mini-gmp is used, a <gmp.h> header should be installed as well,
say under <libguile/mini-gmp.h>.  WDYT?

> Since mini-gmp is not binary compatible,

I don’t think there’s a problem, because only mpz_t objects appear in
the API, and they’re pointers.

> 4. mini-gmp has no mp_set_memory_functions.

So apparently you eventually added them, thanks!

Thanks,
Ludo’.