summaryrefslogtreecommitdiffstats
path: root/Doc/api/api.tex
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-11-28 22:34:32 (GMT)
committerFred Drake <fdrake@acm.org>2000-11-28 22:34:32 (GMT)
commitee814bf2c9d4b4a578064e69764ed58cfc223846 (patch)
treee32b4f1109a5166bff072089d0b32c348f0453d0 /Doc/api/api.tex
parent83ff4af1a3d30ead430109114c785d569313226a (diff)
downloadcpython-ee814bf2c9d4b4a578064e69764ed58cfc223846.zip
cpython-ee814bf2c9d4b4a578064e69764ed58cfc223846.tar.gz
cpython-ee814bf2c9d4b4a578064e69764ed58cfc223846.tar.bz2
Added documentation for the Py_InitModule*() family of functions.
Diffstat (limited to 'Doc/api/api.tex')
-rw-r--r--Doc/api/api.tex32
1 files changed, 31 insertions, 1 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index 3f3b65f..e38e0b5 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -4650,7 +4650,37 @@ implementing new object types in C.
\begin{cfuncdesc}{void}{PyObject_DEL}{PyObject *op}
\end{cfuncdesc}
-Py_InitModule (!!!)
+\begin{cfuncdesc}{PyObject*}{Py_InitModule}{char *name,
+ PyMethodDef *methods}
+ Create a new module object based on a name and table of functions,
+ returning the new module object.
+\end{cfuncdesc}
+
+\begin{cfuncdesc}{PyObject*}{Py_InitModule3}{char *name,
+ PyMethodDef *methods,
+ char *doc}
+ Create a new module object based on a name and table of functions,
+ returning the new module object. If \var{doc} is non-\NULL, it will
+ be used to define the docstring for the module.
+\end{cfuncdesc}
+
+\begin{cfuncdesc}{PyObject*}{Py_InitModule4}{char *name,
+ PyMethodDef *methods,
+ char *doc, PyObject *self,
+ int apiver}
+ Create a new module object based on a name and table of functions,
+ returning the new module object. If \var{doc} is non-\NULL, it will
+ be used to define the docstring for the module. If \var{self} is
+ non-\NULL, it will passed to the functions of the module as their
+ (otherwise \NULL) first parameter. (This was added as an
+ experimental feature, and there are no known uses in the current
+ version of Python.) For \var{apiver}, the only value which should
+ be passed is defined by the constant \constant{PYTHON_API_VERSION}.
+
+ \strong{Note:} Most uses of this function should probably be using
+ the \cfunction{Py_InitModule3()} instead; only use this if you are
+ sure you need it.
+\end{cfuncdesc}
PyArg_ParseTupleAndKeywords, PyArg_ParseTuple, PyArg_Parse