_mp_alloc vs ALLOC
Marc Glisse
marc.glisse at inria.fr
Mon Jun 4 21:20:58 CEST 2012
On Mon, 4 Jun 2012, Torbjorn Granlund wrote:
> Pedro Gimeno <p.gimeno at formauri.es> writes:
>
> My recollection is that gmp_errno was not thread-safe, not just
> obsolete, and that that was a reason for getting rid of it.
If the main issue with gmp_errno is thread-safety, it should just become
thread-local, like the regular errno. Doing the right configuration magic
may be some work, but other projects must have done it before.
> Making some C error handling mechanism would be great, though. I am not
> sure that's easy, though. "For error handling, use C++"?
One great thing about C++ exceptions is how little they cost when no
exception is thrown.
--
Marc Glisse
More information about the gmp-devel
mailing list