[pypy-dev] cppyy and callbacks
Alex Stewart
foogod at gmail.com
Sat Jan 11 02:38:23 CET 2014
Hey Wim,
Thanks for all the useful info on the status of things!
> Overriding of virtual functions can only be done with a helper class
> deriving from the callback interface on the C++ side. There's no other
> (portable) way.
Yeah, I kinda figured this would be required regardless, and that bit isn't
really that onerous.. it was mainly the extra cffi -> Python -> C++ ->
Python round-trip I was hoping to be able to avoid somehow..
> For global functions, I've found helper with void* + cffi (the way you've
>
described in your mail) enough. Yes, that isn't satisfactory, but last
> year the priority has been Cling.
>
Entirely understandable (and the Cling stuff sounds like a better solution
all round, so I agree with that priority). At least now I know I'm on the
right track for an interim solution, and something better is actually on
the way. :)
As such, it all took about a year longer, but since end of November last
> year, we now have a working bindings generator for Cling, but only on
> CPython. I've only just started (this week) with the groundwork of getting
> a
> back-end for cppyy into shape.
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..)
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)? It's not
something I really need for this particular project, but it would be really
cool if the Bullet library bindings I'm making (and potentially other C++
libraries) could eventually be used from either PyPy or CPython
interchangeably..
I never made a standalone libcppyy_backend library for CINT, as I don't
> expect there to be any use (physicists in HEP use by and large only
> releases
> provided by their experiments' software group; and CINT should be on its
> way
> out now that we have Cling largely working).
That's ok, by the sound of things the Cling-based stuff is moving along
well and I can probably wait around a bit for that instead. :)
Anyway, thanks for the diligent work! I'm really looking forward to seeing
the cling-cppyy (and will be happy to test, etc) when it's ready.
--Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20140110/15abb142/attachment.html>
More information about the pypy-dev
mailing list