Read about our upcoming Code of Conduct on this issue

This instance will be upgraded to Heptapod 0.28.1 on 2022-01-26 at 16:00 UTC+1 (a few minutes of down time)

README.md 944 Bytes
Newer Older
Armin Rigo's avatar
Armin Rigo committed
1
2
3
ffi
===

Alex Gaynor's avatar
Alex Gaynor committed
4
Foreign Function Interface for Python.
5
6
7
8
9
10


Initial motivation
------------------

http://mail.python.org/pipermail/pypy-dev/2012-May/009915.html
Armin Rigo's avatar
Armin Rigo committed
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37


Current status
--------------

* works as a ctypes replacement
* can use internally either ctypes or a C extension module


Next steps
----------

the verify() step, which should handle:
 * completing "...;" structs
 * checking the other structs, and the arguments to functions, using the real C compiler
 * simple "#define FOO value" macros
 * macros of the kind "#define funcname otherfuncname"
 * more complicated macros "#define foo(a, b, c) ..."
 * checking and correcting the value of the enum {} declarations
 * probably also fixing the array lengths, e.g. declared as a field "int foo[...];"

generating C extensions:
 * this is needed anyway to call macros
 * faster, libffi-free way to call C code
 * partial blockers: callbacks (probably still use libffi)

_ffi backend for PyPy