[pypy-dev] PyPy C API

Amaury Forgeot d'Arc amauryfa at gmail.com
Fri Jul 20 22:28:39 CEST 2012


2012/7/20 Alexander Pyattaev <alex.pyattaev at gmail.com>:
> I think that most of the end-users would not care much and would use SWIG
> anyway, because it is simple to do and scalable. So whatever API you decide
> to go with, the only real problem will be to make a swig wrapper library for
> that and about 80% of applications that use SWIG would not even need any
> tweaks to work. I'd be able to help with those wrappers, did quite a few of
> them so far.

I also worked a lot with SWIG, and it does not hide the interpreter API at all;
most of the time you write a %typemap, you'll need functions like
PyString_FromString.
(For example, the one for char**argv)

And advanced uses (callbacks, threads, directors for C++) will need advanced API
functions (like PyThreadState_New) to properly integrate the library
with Python.

-- 
Amaury Forgeot d'Arc


More information about the pypy-dev mailing list