mp_ptr and mp_srcptr

bodrato at bodrato at
Thu Feb 3 08:41:16 CET 2011

Ciao Paul,

On Thu, January 27, 2011 8:06 am, Paul Zimmermann wrote:
> on December 17, Vincent Lefèvre asked a question about mp_ptr and
> mp_srcptr

I do not have a firm opinion on the subject: should mp_ptr and mp_srcptr
be documented or not?

They are defined and widely used in gmp.h as an handy alias for mp_limb_t*
(possibly const); we also have mp[zqf]_{,src}ptr defined and used in gmp.h
with the same naming convention.

On the other side, there are very few basic types defined in
Moreover all documented types have the "_t" suffix.
Should we add the "_t" suffix to derived types before documenting them?
Should we document derived types at all? Or should we remove them from the
gmp.h header file to avoid polluting the namespace? Or prepend the "__"
prefix to mark them as private?

I weakly prefer the option: add "_t", then document; but I'm waiting for
opinions from other users or developers.

Best regards,


More information about the gmp-discuss mailing list