Re: [mpir-devel] How To Distinguish Initialized from Cleared Var?

2011-04-30 Thread Bob Smith
On 4/30/2011 8:04 PM, Bill Hart wrote: The internals of the struct don't change when calling mpz_clear. The only thing you could do is wrap mpz_clear in a function which modifies one of the fields and call that instead, e.g. set _mp_alloc to 0 and _mp_size to 1. However it is undocumented that mp

Re: [mpir-devel] How To Distinguish Initialized from Cleared Var?

2011-04-30 Thread Bill Hart
The internals of the struct don't change when calling mpz_clear. The only thing you could do is wrap mpz_clear in a function which modifies one of the fields and call that instead, e.g. set _mp_alloc to 0 and _mp_size to 1. However it is undocumented that mpz_init sets _mp_alloc to 1 and _mp_size t

[mpir-devel] How To Distinguish Initialized from Cleared Var?

2011-04-30 Thread Sudleyplace
To avoid memory leaks, at the end of routines that use mpz/mpq/mpf vars I want to free the ones that have been initialized, but not the ones that haven't. I would greatly prefer to do this at the end rather than track each var's status throughout the code. In C, I declare a var as (say) MP_INT m

[mpir-devel] Re: MPIR v2.4 Plan

2011-04-30 Thread Cactus
On Apr 30, 9:14 am, Jason wrote: > On Saturday 30 April 2011 09:05:26 Cactus wrote: > > > On Apr 30, 8:40 am, Jason wrote: > > > Hi > > > > I've removed the pa64 pa32 and s390 directory's and the associated > > > configure stuff and I've moved all the asm code from gmp-impl into the > > > archi

Re: [mpir-devel] Re: MPIR v2.4 Plan

2011-04-30 Thread Jason
On Saturday 30 April 2011 09:05:26 Cactus wrote: > On Apr 30, 8:40 am, Jason wrote: > > Hi > > > > I've removed the pa64 pa32 and s390 directory's and the associated > > configure stuff and I've moved all the asm code from gmp-impl into the > > architecture specific directory's and I've removed t

[mpir-devel] Re: MPIR v2.4 Plan

2011-04-30 Thread Cactus
On Apr 30, 8:40 am, Jason wrote: > Hi > > I've removed the pa64 pa32 and s390 directory's and the associated configure > stuff and I've moved all the asm code from gmp-impl into the architecture > specific directory's and I've removed the -DNO_ASM option. > > We still work under pa64 pa32 and s3

Re: [mpir-devel] Re: MPIR v2.4 Plan

2011-04-30 Thread Jason
Hi I've removed the pa64 pa32 and s390 directory's and the associated configure stuff and I've moved all the asm code from gmp-impl into the architecture specific directory's and I've removed the -DNO_ASM option. We still work under pa64 pa32 and s390 , but we use autotool's defaults and anyon