2012/4/4 Stefan Behnel <stefan...@behnel.de>: >> Its tp_call slot is called, but this is defined to __Pyx_PyCFunction_Call >> which is #defined to PyObject_Call, which itself invokes the tp_call slot... > > Interesting. Then that's the wrong thing to do in PyPy. I guess you just > put it there in your original patch because PyPy doesn't expose > PyCFunction_Call() and it seemed to be the obvious replacement.
I put it there to make the code compile... I did not even realize how it was used. >> A solution would be to access the "base" tp_call, the one that CPython >> exposes as PyCFunction_Call. >> Unfortunately cpyext only defines one tp_call shared by all types, one >> which simply delegates to self.__call__. > > Makes sense for PyPy objects. But not when those objects are subclassed: self.__call__ always accesses the most derived method, whereas a tp_call slot is supposed to point to the type being defined. -- Amaury Forgeot d'Arc _______________________________________________ pypy-dev mailing list pypy-dev@python.org http://mail.python.org/mailman/listinfo/pypy-dev