diff options
author | Guido van Rossum <guido@python.org> | 1998-02-05 19:59:39 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1998-02-05 19:59:39 (GMT) |
commit | afcd58902754328a1c6e7b52e52cbb23801be019 (patch) | |
tree | f2b2c0a50f195d4a7c0d3434f35e25067d87c261 | |
parent | 03710d2a4024a03bf7d16a3dad32117ea7910151 (diff) | |
download | cpython-afcd58902754328a1c6e7b52e52cbb23801be019.zip cpython-afcd58902754328a1c6e7b52e52cbb23801be019.tar.gz cpython-afcd58902754328a1c6e7b52e52cbb23801be019.tar.bz2 |
Retract the statement that all functions called by Python (even method
defs) need to be declared extern "C" -- it seems to have no basis in
truth (any more?).
-rw-r--r-- | Doc/ext.tex | 7 | ||||
-rw-r--r-- | Doc/ext/ext.tex | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/Doc/ext.tex b/Doc/ext.tex index a462792..5603fde 100644 --- a/Doc/ext.tex +++ b/Doc/ext.tex @@ -1227,10 +1227,9 @@ It is possible to write extension modules in \Cpp{}. Some restrictions apply. If the main program (the Python interpreter) is compiled and linked by the \C{} compiler, global or static objects with constructors cannot be used. This is not a problem if the main program is linked -by the \Cpp{} compiler. All functions that will be called directly or -indirectly (i.e. via function pointers) by the Python interpreter will -have to be declared using \code{extern "C"}; this applies to all -``methods'' as well as to the module's initialization function. +by the \Cpp{} compiler. Functions that will be called by the +Python interpreter (in particular, module initalization functions) +have to be declared using \code{extern "C"}. It is unnecessary to enclose the Python header files in \code{extern "C" \{...\}} --- they use this form already if the symbol \samp{__cplusplus} is defined (all recent \Cpp{} compilers define this diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex index a462792..5603fde 100644 --- a/Doc/ext/ext.tex +++ b/Doc/ext/ext.tex @@ -1227,10 +1227,9 @@ It is possible to write extension modules in \Cpp{}. Some restrictions apply. If the main program (the Python interpreter) is compiled and linked by the \C{} compiler, global or static objects with constructors cannot be used. This is not a problem if the main program is linked -by the \Cpp{} compiler. All functions that will be called directly or -indirectly (i.e. via function pointers) by the Python interpreter will -have to be declared using \code{extern "C"}; this applies to all -``methods'' as well as to the module's initialization function. +by the \Cpp{} compiler. Functions that will be called by the +Python interpreter (in particular, module initalization functions) +have to be declared using \code{extern "C"}. It is unnecessary to enclose the Python header files in \code{extern "C" \{...\}} --- they use this form already if the symbol \samp{__cplusplus} is defined (all recent \Cpp{} compilers define this |