[pypy-dev] update (+patch) on embedding pypy
Amaury Forgeot d'Arc
amauryfa at gmail.com
Tue Apr 17 10:58:29 CEST 2012
2012/4/17 Kibeom Kim <kk1674 at nyu.edu>
> It's not my needs, but I think that's better-designed interpreter lib.
> If pypy decides to support, I guess there should be two versions of
> api sets, one for CPython api compatibility, and the other one for
> multiple independent interpreter support.
>
> Py_Initialize();
> Py_Initialize(PyPyInterpreter pypyinterpreter);
>
> PyObject* PyObject_CallObject(PyObject *callable_object, PyObject *args)
> PyObject* PyObject_CallObject(PyPyInterpreter pypyinterpreter, PyObject
> *callable_object, PyObject *args)
>
> But maybe no one needs it... I don't know..
>
This is an interesting evolution indeed;
and pypy code (written in RPython) already passes a "space" object to every
function.
but having several object spaces in the same binary does not work at the
moment.
And even once this is sorted out, I think it's a bad idea to reproduce the
CPython API,
only to add this new parameter. I'm sure a better C API could be designed,
that would
integrate more easily with pypy implementation.
(Use handles instead of pointers, don't expose concrete objects, etc)
--
Amaury Forgeot d'Arc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20120417/10de545e/attachment-0001.html>
More information about the pypy-dev
mailing list