[pypy-dev] Does/will pypy support cpython's c extension modules?

Neal Becker ndbecker2 at gmail.com
Wed Jan 31 01:16:51 CET 2007


Lenard Lindstrom wrote:

> Michael Hudson wrote:
>> Tristan Seligmann <mithrandi at mithrandi.za.net> writes:
>>
>>   
>>> 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.
> 
> As long as there are no C++ exceptions to catch.
> 
> 
>> Oh, hmm, templates.
>> They'd be a pain, wouldn't they :-)
>>
>>   
> Exporting templates in a shared library: that's a trick I'm unfamiliar
> with ;-)
> 
> 

In case you weren't kidding, you have to export your choice of
instantiations.

If your object is to take your favorite generic c++ code and access it from
python, that can be quite reasonable.




More information about the Pypy-dev mailing list