documentation on internals not up to date

Marco Bodrato bodrato at
Fri Apr 27 15:07:49 UTC 2018


Il Ven, 27 Aprile 2018 10:50 am, Niels Möller ha scritto:
> I'd prefer that we not document any way to pass _roinit values to any
> mpz functions taking a non-const mpz_t, even if it happens to work in
> the current implementation. Maybe as a later extension, *if* we find
> some use cases where it provides a significant advantage.

Ok, you are right, I agree.

By the way, "it happens to work" because of the lazy allocation.

> I'd also consider backing that up by having the realloc function abort
> in case _mp_alloc == 0 but _mp_size != 0.

With an ASSERT? Seems unnecessary to me.

Well, we decided what we should not write. Now, let's decide what to write



More information about the gmp-devel mailing list