summaryrefslogtreecommitdiffstats
path: root/Doc/ext/extending.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-09-06 16:30:30 (GMT)
committerFred Drake <fdrake@acm.org>2001-09-06 16:30:30 (GMT)
commit396ca574ddf6cf0df390166d450d67d5d57f5884 (patch)
tree5824219d8ea13c38db78199145cae2ad214bf064 /Doc/ext/extending.tex
parent9b88b4c9e8e8604d2f8f66efd9c9cecb5ad2e364 (diff)
downloadcpython-396ca574ddf6cf0df390166d450d67d5d57f5884.zip
cpython-396ca574ddf6cf0df390166d450d67d5d57f5884.tar.gz
cpython-396ca574ddf6cf0df390166d450d67d5d57f5884.tar.bz2
Document the rule that Python.h must be included before any standard
headers. This is the final checkin for SF bug #458768.
Diffstat (limited to 'Doc/ext/extending.tex')
-rw-r--r--Doc/ext/extending.tex6
1 files changed, 4 insertions, 2 deletions
diff --git a/Doc/ext/extending.tex b/Doc/ext/extending.tex
index ee1b678..d3661ab 100644
--- a/Doc/ext/extending.tex
+++ b/Doc/ext/extending.tex
@@ -46,8 +46,11 @@ The first line of our file can be:
which pulls in the Python API (you can add a comment describing the
purpose of the module and a copyright notice if you like).
+Since Python may define some pre-processor definitions which affect
+the standard headers on some systems, you must include \file{Python.h}
+before any standard headers are included.
-All user-visible symbols defined by \code{"Python.h"} have a prefix of
+All user-visible symbols defined by \file{Python.h} have a prefix of
\samp{Py} or \samp{PY}, except those defined in standard header files.
For convenience, and since they are used extensively by the Python
interpreter, \code{"Python.h"} includes a few standard header files:
@@ -951,7 +954,6 @@ Geoff Philbrick (\email{philbrick@hks.com}):%
\index{Philbrick, Geoff}
\begin{verbatim}
-#include <stdio.h>
#include "Python.h"
static PyObject *