[pypy-commit] cffi default: Document what we do with "int foo(); ".

arigo noreply at buildbot.pypy.org
Wed Apr 29 13:23:28 CEST 2015


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r1875:98b0b26c05e2
Date: 2015-04-29 13:24 +0200
http://bitbucket.org/cffi/cffi/changeset/98b0b26c05e2/

Log:	Document what we do with "int foo();".

diff --git a/doc/source/index.rst b/doc/source/index.rst
--- a/doc/source/index.rst
+++ b/doc/source/index.rst
@@ -1088,6 +1088,13 @@
 signature is fixed or not.  (On x86-64, the difference can sometimes be
 seen in PyPy's JIT-generated code if some arguments are ``double``.)
 
+Note that the function signature ``int foo();`` is interpreted by CFFI
+as equivalent to ``int foo(void);``.  This differs from the C standard,
+in which ``int foo();`` is really like ``int foo(...);`` and can be
+called with any arguments.  (This feature of C is a pre-C89 relic: the
+arguments cannot be accessed at all in the body of ``foo()`` without
+relying on compiler-specific extensions.)
+
 
 Callbacks
 ---------


More information about the pypy-commit mailing list