[pypy-dev] Bringing Cython and PyPy closer together

Stefan Behnel stefan_ml at behnel.de
Mon Feb 20 09:05:06 CET 2012


Amaury Forgeot d'Arc, 19.02.2012 23:10:
> 2012/2/19 Stefan Behnel
> 
>> That's different for PyComplexObject, which allows direct unboxed access to
>> the real and imaginary number fields. Cython makes use of that for
>> interfacing between C/C++ complex and Python complex.
> 
> Why don't you use PyComplex_AsCComplex or other similar API for this?

You are right, there is really just one mention of that in the code base,
so it's easy to fix for non-CPython. Doing this, I noticed a bug in the
standard declarations of CPython's C-API that Cython ships for user code,
which leads to an accidental and useless reference to PyBoolObject and
PyComplexObject in the generated modules. I'll find a way to fix those,
too, so don't worry about them.

Stefan



More information about the pypy-dev mailing list