diff options
| author | Fred Drake <fdrake@acm.org> | 2001-05-21 15:56:55 (GMT) | 
|---|---|---|
| committer | Fred Drake <fdrake@acm.org> | 2001-05-21 15:56:55 (GMT) | 
| commit | 24e621918bc00d08e02cb7d92ef9a2e08cfcb49d (patch) | |
| tree | 52ea5d4928f9432e3a68e71eb482dc518bb4637f | |
| parent | fc43d00c17ed016337fbac46a532c809321d6a3c (diff) | |
| download | cpython-24e621918bc00d08e02cb7d92ef9a2e08cfcb49d.zip cpython-24e621918bc00d08e02cb7d92ef9a2e08cfcb49d.tar.gz cpython-24e621918bc00d08e02cb7d92ef9a2e08cfcb49d.tar.bz2 | |
Add documentation for Py_Main() and PyThreadState_GetDict().
| -rw-r--r-- | Doc/api/api.tex | 21 | 
1 files changed, 21 insertions, 0 deletions
| diff --git a/Doc/api/api.tex b/Doc/api/api.tex index 9d3eb3e..b589d3c 100644 --- a/Doc/api/api.tex +++ b/Doc/api/api.tex @@ -609,6 +609,19 @@ so care should be taken that \ctype{FILE*} parameters are only passed  to these functions if it is certain that they were created by the same  library that the Python runtime is using. +\begin{cfuncdesc}{int}{Py_Main}{int argc, char **argv} +  The main program for the standard interpreter.  This is made +  available for programs which embed Python.  The \var{argc} and +  \var{argv} parameters should be prepared exactly as those which are +  passed to a C program's \cfunction{main()} function.  It is +  important to note that the argument list may be modified (but the +  contents of the strings pointed to by the argument list are not). +  The return value will be the integer passed to the +  \function{sys.exit()} function, \code{1} if the interpreter exits +  due to an exception, or \code{2} if the parameter list does not +  represent a valid Python command line. +\end{cfuncdesc} +  \begin{cfuncdesc}{int}{PyRun_AnyFile}{FILE *fp, char *filename}    If \var{fp} refers to a file associated with an interactive device    (console or terminal input or \UNIX{} pseudo-terminal), return the @@ -4631,6 +4644,14 @@ argument \var{tstate}, which may be \NULL{}.  The interpreter lock  must be held.  \end{cfuncdesc} +\begin{cfuncdesc}{PyObject*}{PyThreadState_GetDict}{} +Return a dictionary in which extensions can store thread-specific +state information.  Each extension should use a unique key to use to +store state in the dictionary.  If this function returns \NULL, an +exception has been raised and the caller should allow it to +propogate. +\end{cfuncdesc} +  \chapter{Memory Management \label{memory}}  \sectionauthor{Vladimir Marangozov}{Vladimir.Marangozov@inrialpes.fr} | 
