[pypy-dev] Cython-CEP: Native dispatch through Python callables

Stefan Behnel stefan_ml at behnel.de
Fri Apr 13 20:57:32 CEST 2012


Alex Gaynor, 13.04.2012 20:25:
> On Fri, Apr 13, 2012 at 2:18 PM, Stefan Behnel wrote:
>> wlavrijsen at lbl.gov, 13.04.2012 19:03:
>>> Integrating unpacked functions pointers with PyPy works rather elegantly
>>> through the functionality made available in rlib/libffi.py. The form of
>>> the specification matters little at that point, as long as it is
>>> complete.
>>
>> Hmm, but that's RPython, isn't it? I thought that was compiled statically?
>> How would it adapt to a signature that it finds at runtime then?
>>
>> I think this is closer to ctypes, except that you don't have to specify the
>> signature of the thing you call because PyPy will see it at call time.
> 
> rlib/libffi.py is for runtime stuff, it's the basis of both ctypes and the
> C++ wrapper.  You may be thinking of rffi.py, which is compile time.

Ah, cool. Good to know. Then it shouldn't be much work for PyPy to support
this.

Stefan



More information about the pypy-dev mailing list