[pypy-issue] [issue1434] CPyExt errors with PyGObject

Amaury Forgeot d Arc tracker at bugs.pypy.org
Sat Apr 6 17:43:48 CEST 2013


Amaury Forgeot d Arc <amauryfa at gmail.com> added the comment:

I came to the same conclusion.  This is an old issue with our C API layer: there is only one 
emulation of tp_new for all types provided by PyPy, and it does something like 
subclass.__new__(args).
The solution is to have a distinct tp_new for each type, which makes sense if you think about it.

Here is a tentative patch; it's not finished: more tests are needed, and we should migrate all 
slots emulation in this manner; but I fear that the (translated) code size explodes...

________________________________________
PyPy bug tracker <tracker at bugs.pypy.org>
<https://bugs.pypy.org/issue1434>
________________________________________


More information about the pypy-issue mailing list