Author: Armin Rigo <ar...@tunes.org> Branch: Changeset: r2270:478fd8ef38b4 Date: 2015-09-15 14:17 +0200 http://bitbucket.org/cffi/cffi/changeset/478fd8ef38b4/
Log: Try to be even clearer about when a C compiler is required and when it is not. diff --git a/doc/source/overview.rst b/doc/source/overview.rst --- a/doc/source/overview.rst +++ b/doc/source/overview.rst @@ -44,6 +44,8 @@ arguments. In the above example it would be ``b"world"`` and ``b"hi there, %s!\n"``. In general it is ``somestring.encode(myencoding)``. +*This example does not call any C compiler.* + .. _out-of-line-abi-level: @@ -58,6 +60,8 @@ ``cdef()`` many times with small pieces of declarations, based on the version of libraries detected on the system). +*This example does not call any C compiler.* + .. code-block:: python # file "simple_example_build.py" @@ -155,6 +159,10 @@ module to generate based on whether the second argument to ``set_source()`` is ``None`` or not.) +*You need a C compiler for this single step. It produces a file called +e.g. _example.so or _example.pyd. If needed, it can be distributed in +precompiled form like any other extension module.* + Then, in your main program, you use: .. code-block:: python @@ -218,6 +226,8 @@ .. _struct: http://docs.python.org/library/struct.html .. _array: http://docs.python.org/library/array.html +*This example does not call any C compiler.* + This example also admits an out-of-line equivalent. It is similar to `Out-of-line example (ABI level, out-of-line)`_ above, but without any call to ``ffi.dlopen()``. In the main program, you write ``from @@ -272,6 +282,10 @@ result = lib.foo(buffer_in, buffer_out, 1000) +*You need a C compiler to run example_build.py, once. It produces a +file called e.g. _example.so or _example.pyd. If needed, it can be +distributed in precompiled form like any other extension module.* + What actually happened? ----------------------- _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit