[pypy-dev] offtopic, ontopic, ...
arigo at tunes.org
Tue Feb 14 16:19:54 CET 2012
On Tue, Feb 14, 2012 at 14:47, Martijn Faassen <faassen at startifact.com> wrote:
> But Cython-based code does talk to C APIs, so there is a problem.
> Python code in PyPy needs to be able to interface with C APIs first in
> order to generate the right stuff from Cython.
That's not necessarily hard. I believe that Cython code like this:
PyObject *x = PyDict_GetItem(y, key)
can correspond "faithfully" to Python code like that --- if we assume
that 'y' contains really a dict:
x = y[key]
I don't know to what extend the whole C API can be mapped back to
Python, but certainly the most common functions can.
More information about the pypy-dev