Lisandro Dalcin wrote: > On Wed, Oct 14, 2009 at 2:26 PM, Stefan Behnel <[email protected]> wrote: >> Lisandro Dalcin wrote: >>> I think I'll use >>> PyLong_{From|As}VoidPtr for importing/exporting the API structure... >>> Making it simpler will make it also portable across all CPython >>> versions. >> But it wouldn't make it compatible with other non-Cython C-APIs, would it? >> I think that's a requirement. If there's a standard way, Cython should be >> 100% compatible with that. >> > > Please note I was talking JUST about the refnanny support module. The > import/export of its C-API (actually a pointer to a struct) what > rather ad-hoc and used PyCObject... I do not really see the point of > bothering about the refnanny module "properly" exporting its API and > complicating the implementation now that CObjects are not available in > all Python runtimes. > >>> Additionally, I'll make a heavy renaming of some refnanny stuff, >>> things will be now named "__Pyx_RefNanny[XXX]". >> What's that for? >> > > Just for the sake of the generated C code being more easier to follow > and understand... We always talk about "refnanny", why not generate > the C code using that name consistently where appropriate. > Additionally, I'm changing the way of using the CYTHON_REFNANNY macro > with the preprocessor... Now you have to explicitly #define it to 1, > (as we require for complex support, and C-level profiling) ...
I'd say it is the complex support and profiling who's got it wrong and CYTHON_REFNANNY that's got it right. Being able to do "-DOPTION" and use #ifdef is *very* common. -- Dag Sverre _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
