From: Travis O. <oli...@ee...> - 2006-07-07 20:39:17
|
Fernando Perez wrote: >On 7/7/06, Travis Oliphant <oli...@ee...> wrote: > > > >>Also, (in latest SVN) the MAXMIN macros can be avoided using >> >>#define PYA_NOMAXMIN >> >>before including arrayobject.h >> >> > >Mmh, this looks crufty to me: special cases like these look bad in a >library, and break the 'just works' ideal we all strive for, IMHO. > > But, it fixes the problem he's having without breaking anybody else's code that uses the MAX / MIN macros, already. Besides, the PY_ARRAY_TYPES_PREFIX business is a lot more crufty. I'm not opposed to putting a *short* prefix in front of everything (the Int32, Float64, stuff came from numarray which now has it's own back-ward compatible header where it could be placed now anyway). Perhaps npy_ would be a suitable prefix. That way we could get rid of the cruft entirely. I suppose we could also provide the noprefix.h header that defines the old un-prefixed cases for "backwards NumPy compatibility". -Travis |