"Marco Bodrato" <bodr...@mail.dm.unipi.it> writes: If I understand correctly what Vincent underlines with his message, we should explain that both the macros mpq_{num,den}ref and the return value of mpz_roinit_n are intended for direct use as arguments of mpz functions. The former with a possible read-write role, the latter for read-only uses.
Yes, that seems necessary. I also think usage of mpz_roinit_n might lead to memory leaks, triggered by mpz_init (or lack of mpz_clear) before its use. We need to point this out. I believe that both types will not change their role or definition in the near future, as such they can be documented. I'm not sure about: how we should explain how to use them. That is a challenge. At the minimum, we should make it clear that they should only be used by advanced users. (Should we provide similar types for mpq and mpf?) -- Torbjörn Please encrypt, key id 0xC8601622 _______________________________________________ gmp-devel mailing list gmp-devel@gmplib.org https://gmplib.org/mailman/listinfo/gmp-devel