I think we shoudl either disable it, or make it be really good: meaning
completely skipping the C-call layer, and just making things super simple:
def PyListAppend(list, item):
list.append(item)
There's no point in having it if it's super expensive (IMO).
Alex
On Sat, Jun 21, 2014 at 1:24 PM, Matti Picus <[email protected]> wrote:
> Cpython has a feature that allows you to call c-api functions from python
> via ctypes.pythonapi
> It doesn't currently work on pypy, I started to document why not on the
> disable_pythonapi branch:
>
> ``ctypes.pythonapi`` lets you access the CPython C API
> emulation layer. It does not work on PyPy at the moment, we are
> missing a
> ``getfunc`` method for CDLL. Work was begun
> to refactor the rpython implementation of _rawffi (in
> pypy/modules/_rawffi/alt) but that project has stalled.
>
> Note that even if it worked, our implementation would not do anything
> sensible about the GIL and the functions will be named with an extra
> "Py", for example ``PyPyInt_FromLong()``. Basically, don't use this.
> Assuming the PyObject pointers you get have any particular fields in
> any particular order is just going to crash.
>
> but since it is such a bad idea, can we just disable it instead of fixing?
> In Favor of disabling: no need to extend _rawffi, only remove some code
> and fix tests
> Against disabling: another obscure cpython incompatability
>
> Matti
>
> _______________________________________________
> pypy-dev mailing list
> [email protected]
> https://mail.python.org/mailman/listinfo/pypy-dev
>
>
--
"I disapprove of what you say, but I will defend to the death your right to
say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
"The people's good is the highest law." -- Cicero
GPG Key fingerprint: 125F 5C67 DFE9 4084
_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev