summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-09-23 03:25:42 (GMT)
committerFred Drake <fdrake@acm.org>2000-09-23 03:25:42 (GMT)
commit891150bdf2773b9e8ad9e92db073805afd7722cd (patch)
tree57c5fd873c74c4a5a2235d5876944374f7841c1b
parent9e2851566c0dd1d27d29ead8988f4cc3ae295ca1 (diff)
downloadcpython-891150bdf2773b9e8ad9e92db073805afd7722cd.zip
cpython-891150bdf2773b9e8ad9e92db073805afd7722cd.tar.gz
cpython-891150bdf2773b9e8ad9e92db073805afd7722cd.tar.bz2
Added documentation for the new PyModule_*() convenience functions.
This closes SourceForge patch #101233.
-rw-r--r--Doc/api/api.tex26
1 files changed, 26 insertions, 0 deletions
diff --git a/Doc/api/api.tex b/Doc/api/api.tex
index 0a475f6..6ce5f29 100644
--- a/Doc/api/api.tex
+++ b/Doc/api/api.tex
@@ -3680,6 +3680,32 @@ or if it is not a string, raise \exception{SystemError} and return
\withsubitem{(built-in exception)}{\ttindex{SystemError}}
\end{cfuncdesc}
+\begin{cfuncdesc}{int}{PyModule_AddObject}{PyObject *module,
+ char *name, PyObject *value}
+Add an object to \var{module} as \var{name}. This is a convenience
+function which can be used from the module's initialization function.
+This steals a reference to \var{value}. Returns \code{-1} on error,
+\code{0} on success.
+\versionadded{2.0}
+\end{cfuncdesc}
+
+\begin{cfuncdesc}{int}{PyModule_AddIntConstant}{PyObject *module,
+ char *name, int value}
+Add an integer constant to \var{module} as \var{name}. This convenience
+function can be used from the module's initialization function.
+Returns \code{-1} on error, \code{0} on success.
+\versionadded{2.0}
+\end{cfuncdesc}
+
+\begin{cfuncdesc}{int}{PyModule_AddStringConstant}{PyObject *module,
+ char *name, char *value}
+Add a string constant to \var{module} as \var{name}. This convenience
+function can be used from the module's initialization function. The
+string \var{value} must be null-terminated. Returns \code{-1} on
+error, \code{0} on success.
+\versionadded{2.0}
+\end{cfuncdesc}
+
\subsection{CObjects \label{cObjects}}