[pypy-dev] cppyy and callbacks
wlavrijsen at lbl.gov
wlavrijsen at lbl.gov
Thu Jan 23 04:26:58 CET 2014
Hi Alex,
> Out of curiosity, how much work do you expect the cppyy part of things to
> be? (I'd offer to help, but I suspect it's all way over my head..)
the work it self is mostly transliterating code. Cleaning it up and removing
dependencies is a different matter.
> This does also beg another question that's sorta been at the back of my
> mind for a bit: Since all of the underlying stuff gets done in CPython
> first, Is there any chance that at some point we might see a version of
> cppyy for CPython as well (with similar usage and dependencies)?
That is the plan, as I have some folks here that are demanding it.
As a complete aside ...
I'm convinced that the version of cppyy with the loadable C-API could just
as well be served with something that SWIG could produce. Not with the one
that produces CPython extensions, but using the SWIG parser to generate
something akin to Reflex dictionaries. That is not so far off as it may
seem, as it does most of that already anyway, just cross-sprinkled with
Python C-API calls that would need to be removed.
The C-API that needs to be filled in for cppyy is really straightforward,
and can be implemented incrementally. (I've added a dummy_backend.cxx to
allow some tests to proceed even when genreflex is not installed and that
proves the point sufficiently.) The API could also be modified, if need be.
SWIG is not useful for us (it can't parse our headers), and some .py would
still need to be generated (to provide the exact same interface as it does
for CPython), but a 'swig -pypy' based on this should not be too hard.
Best regards,
Wim
--
WLavrijsen at lbl.gov -- +1 (510) 486 6411 -- www.lavrijsen.net
More information about the pypy-dev
mailing list