[pypy-dev] Does/will pypy support cpython's c extension modules?
Michael Hudson
mwh at python.net
Tue Jan 30 17:11:23 CET 2007
Tristan Seligmann <mithrandi at mithrandi.za.net> writes:
> * Neal Becker <ndbecker2 at gmail.com> [2007-01-29 14:56:27 -0500]:
>
>> Sean Lynch wrote:
>>
>> > Please no. Porting modules to ctypes is well worth the effort because
>> > then they will work with Jython and IronPython as well as CPython and
>> > PyPy. IMHO the CPython extension API is the "wrong" way to extend Python
>> > and has been since the beginning, not least because it assumes
>> > implementation details of the interpreter like reference counting,
>> > object layout, etc.
>>
>> I have tons of code using boost::python. Wouldn't it be a lot of work to
>> port to ctypes? I'm guessing, it's basically a complete rewrite.
I guess there's a chance that boost::python is sufficiently
declarative that you could make code using it work for PyPy
too... don't know the details at all though.
> Is it even feasible to wrap a C++ library with ctypes?
I guess it must be possible -- the name mangling rules aren't that
hard, really -- but I don't know about feasible. Oh, hmm, templates.
They'd be a pain, wouldn't they :-)
Cheers,
mwh
--
... but I guess there are some things that are so gross you just have
to forget, or it'll destroy something within you. perl is the first
such thing I have known. -- Erik Naggum, comp.lang.lisp
More information about the pypy-dev
mailing list