[GiNaC-list] Non-reentrant code in GCD functions
Jens Vollinga
jensv at nikhef.nl
Sun Jun 13 23:08:24 CEST 2010
Hi!
Am 13.06.2010 23:04, schrieb Richard B. Kreckel:
>> 44 void primpart_content(ex& pp, ex& c, ex e, const exvector& vars,
>> 45 const long p)
>> 46 {
>> 47 static const ex ex1(1);
>> 48 static const ex ex0(0);
>
> Is there a reason why this code isn't using the flyweights from
> utils.cpp directly? And, could these flyweights be safe in a threaded
Alexei should know.
> environment? I would assume no thread ever deallocates them since their
> refcount stays above zero all the time. Wrong?
Yes, they should be safe for the reasons you gave.
Regards,
Jens
More information about the GiNaC-list
mailing list