_ptr and _srcptr types

Torbjörn Granlund tg at gmplib.org
Mon May 14 11:58:20 UTC 2018


Emmanuel Thomé <Emmanuel.Thome at inria.fr> writes:

  ~/gmp $ grep 'mp[a-z]*_[a-z]*ptr' doc/gmp.texi
  @deftypefun mpz_srcptr mpz_roinit_n (mpz_t @var{x}, const mp_limb_t *@var{xp}, mp_size_t @var{xs})

  (which leaves the reader a but puzzled, as mpz_srcptr is really unheard
  of in the doc).

The return type there is not something we should, it's not how other GMP
functions work.  The use of an internal type is also undesirable, but
declaring that is not the solution for mpz_roinit_n.

  I've personally always used the mpz_ptr and mpz_srcptr in functions that
  take mpz arguments, taking the liberty to use this undocumented type.

I suppose we could declare these.  I'd like to hear from the rest of the
GMP "core team".

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list