Author: Armin Rigo <ar...@tunes.org> Branch: static-callback-embedding Changeset: r2583:1c5c52f0ee90 Date: 2016-01-14 23:10 +0100 http://bitbucket.org/cffi/cffi/changeset/1c5c52f0ee90/
Log: Bah diff --git a/cffi/_embedding.h b/cffi/_embedding.h --- a/cffi/_embedding.h +++ b/cffi/_embedding.h @@ -123,6 +123,9 @@ XXX we should also give a way to write errors to a buffer instead of to stderr. + + XXX if importing 'site' fails, CPython (any version) calls + exit(). Should we try to work around this behavior here? */ Py_InitializeEx(0); } diff --git a/doc/source/embedding.rst b/doc/source/embedding.rst --- a/doc/source/embedding.rst +++ b/doc/source/embedding.rst @@ -122,6 +122,10 @@ call it, an error message is also printed to stderr and the function returns zero/null. + Note that the CFFI module never calls ``exit()``, but CPython itself + contains code that calls ``exit()``, for example if importing + ``site`` fails. This may be worked around in the future. + * **ffi.set_source(c_module_name, c_code):** set the name of the module from Python's point of view. It also gives more C code which will be included in the generated C code. In trivial examples it _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit