[pypy-commit] cffi default: Document the fact that the C code contains '#define Py_LIMITED_API'.
arigo
pypy.commits at gmail.com
Sun Jul 31 15:03:25 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r2729:8f867f5a869f
Date: 2016-07-31 21:05 +0200
http://bitbucket.org/cffi/cffi/changeset/8f867f5a869f/
Log: Document the fact that the C code contains '#define Py_LIMITED_API'.
diff --git a/doc/source/cdef.rst b/doc/source/cdef.rst
--- a/doc/source/cdef.rst
+++ b/doc/source/cdef.rst
@@ -524,6 +524,17 @@
the mtime to be updated anyway, delete the file before calling the
functions.
+*New in version 1.8:* the C code produced by ``emit_c_code()`` or
+``compile()`` contains ``#define Py_LIMITED_API``. This means that on
+CPython >= 3.2, compiling this source produces a binary .so/.dll that
+should work for any version of CPython >= 3.2 (as opposed to only for
+the same version of CPython x.y). However, the standard ``distutils``
+package will still produce a file called e.g.
+``NAME.cpython-35m-x86_64-linux-gnu.so``. You can manually rename it to
+``NAME.abi3.so``. There are certainly other ways to compile the C code
+that produce directly the correct file name, but I know of no
+widely-used solution.
+
**ffibuilder.compile(tmpdir='.', verbose=False):**
explicitly generate the .py or .c file,
and (if .c) compile it. The output file is (or are) put in the
More information about the pypy-commit
mailing list