summaryrefslogtreecommitdiffstats
path: root/Doc/ext
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-05-10 20:33:18 (GMT)
committerFred Drake <fdrake@acm.org>2000-05-10 20:33:18 (GMT)
commit2d545235511d3a7e39b9a24cc67c3769acb10700 (patch)
treea8dbd788cab8dc2447db71ef4ae22687bc99616b /Doc/ext
parentcf3ba6574937d029aadac577996e79ca2aa7a1a2 (diff)
downloadcpython-2d545235511d3a7e39b9a24cc67c3769acb10700.zip
cpython-2d545235511d3a7e39b9a24cc67c3769acb10700.tar.gz
cpython-2d545235511d3a7e39b9a24cc67c3769acb10700.tar.bz2
Section "The Module's Method Table and Initialization Function":
Explain that the name of the initialization function must be init<module>(). Omission noted by Daniel Kozan <crum@dev-group.com>.
Diffstat (limited to 'Doc/ext')
-rw-r--r--Doc/ext/ext.tex17
1 files changed, 10 insertions, 7 deletions
diff --git a/Doc/ext/ext.tex b/Doc/ext/ext.tex
index e4a42a8..532331f 100644
--- a/Doc/ext/ext.tex
+++ b/Doc/ext/ext.tex
@@ -379,15 +379,18 @@ the Python-level parameters to be passed in as a tuple acceptable for
parsing via \cfunction{PyArg_ParseTuple()}; more information on this
function is provided below.
-The \constant{METH_KEYWORDS} bit may be set in the third field if keyword
-arguments should be passed to the function. In this case, the C
-function should accept a third \samp{PyObject *} parameter which will
-be a dictionary of keywords. Use \cfunction{PyArg_ParseTupleAndKeywords()}
-to parse the arguments to such a function.
+The \constant{METH_KEYWORDS} bit may be set in the third field if
+keyword arguments should be passed to the function. In this case, the
+C function should accept a third \samp{PyObject *} parameter which
+will be a dictionary of keywords. Use
+\cfunction{PyArg_ParseTupleAndKeywords()} to parse the arguments to
+such a function.
The method table must be passed to the interpreter in the module's
-initialization function (which should be the only non-\code{static}
-item defined in the module file):
+initialization function. The initialization function must be named
+\cfunction{init\var{name}()}, where \var{name} is the name of the
+module, and should be the only non-\keyword{static} item defined in
+the module file:
\begin{verbatim}
void