Skip to content

Commit 09270b5

Browse files
committed
Fixes to make it pass latex without complaints.
1 parent e7fe864 commit 09270b5

2 files changed

Lines changed: 28 additions & 20 deletions

File tree

Doc/api.tex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ \section{Embedding Python}
191191
(replacing \code{1.5} with the current interpreter version) relative
192192
to the parent directory where the executable named \code{python} is
193193
found on the shell command search path (the environment variable
194-
\code{$PATH}). For instance, if the Python executable is found in
194+
\code{\$PATH}). For instance, if the Python executable is found in
195195
\code{/usr/local/bin/python}, it will assume that the libraries are in
196196
\code{/usr/local/lib/python1.5}. In fact, this also the ``fallback''
197197
location, used when no executable file named \code{python} is found
@@ -202,7 +202,7 @@ \section{Embedding Python}
202202

203203
The embedding application can steer the search by calling
204204
\code{Py_SetProgramName(\var{file})} \emph{before} calling
205-
\code{Py_Initialize()}. Note that \code[$PYTHONHOME} still overrides
205+
\code{Py_Initialize()}. Note that \code{\$PYTHONHOME} still overrides
206206
this and \code{\$PYTHONPATH} is still inserted in front of the
207207
standard path.
208208

@@ -1451,19 +1451,19 @@ \chapter{Initialization, Finalization, and Threads}
14511451
\begin{cfuncdesc}{char *}{Py_GetProgramFullPath}{}
14521452
Return the full program name of the Python executable; this is
14531453
computed as a side-effect of deriving the default module search path
1454-
from the program name (set by \code{Py_SetProgramName() above). The
1454+
from the program name (set by \code{Py_SetProgramName()} above). The
14551455
returned string points into static storage; the caller should not
14561456
modify its value. The value is available to Python code as
14571457
\code{sys.executable}. % XXX is that the right sys.name?
14581458
\end{cfuncdesc}
14591459
14601460
\begin{cfuncdesc}{char *}{Py_GetPath}{}
14611461
Return the default module search path; this is computed from the
1462-
program name (set by \code{Py_SetProgramName() above) and some
1462+
program name (set by \code{Py_SetProgramName()} above) and some
14631463
environment variables. The returned string consists of a series of
14641464
directory names separated by a platform dependent delimiter character.
14651465
The delimiter character is \code{':'} on Unix, \code{';'} on
1466-
DOS/Windows, and \code{'\n'} (the ASCII newline character) on
1466+
DOS/Windows, and \code{'\\n'} (the ASCII newline character) on
14671467
Macintosh. The returned string points into static storage; the caller
14681468
should not modify its value. The value is available to Python code
14691469
as the list \code{sys.path}, which may be modified to change the
@@ -1476,7 +1476,9 @@ \chapter{Initialization, Finalization, and Threads}
14761476
Return the version of this Python interpreter. This is a string that
14771477
looks something like
14781478
1479-
\code{"1.5a3 (#67, Aug 1 1997, 22:34:28) [GCC 2.7.2.2]"}.
1479+
\begin{verbatim}
1480+
"1.5a3 (#67, Aug 1 1997, 22:34:28) [GCC 2.7.2.2]"
1481+
\end{verbatim}
14801482
14811483
The first word (up to the first space character) is the current Python
14821484
version; the first three characters are the major and minor version
@@ -1522,7 +1524,9 @@ \chapter{Initialization, Finalization, and Threads}
15221524
Return information about the sequence number and build date and time
15231525
of the current Python interpreter instance, for example
15241526
1525-
\code{"#67, Aug 1 1997, 22:34:28"}
1527+
\begin{verbatim}
1528+
"#67, Aug 1 1997, 22:34:28"
1529+
\end{verbatim}
15261530
15271531
The returned string points into static storage; the caller should not
15281532
modify its value. The value is available to Python code as part of
@@ -1556,13 +1560,13 @@ \section{Thread State and the Global Interpreter Lock}
15561560
\end{cfuncdesc}
15571561
15581562
% XXX These aren't really C functions!
1559-
\begin{cfuncdesc}{Py_BEGIN_ALLOW_THREADS}{}
1563+
\begin{cfuncdesc}{}{Py_BEGIN_ALLOW_THREADS}{}
15601564
\end{cfuncdesc}
15611565
1562-
\begin{cfuncdesc}{Py_BEGIN_END_THREADS}{}
1566+
\begin{cfuncdesc}{}{Py_BEGIN_END_THREADS}{}
15631567
\end{cfuncdesc}
15641568
1565-
\begin{cfuncdesc}{Py_BEGIN_XXX_THREADS}{}
1569+
\begin{cfuncdesc}{}{Py_BEGIN_XXX_THREADS}{}
15661570
\end{cfuncdesc}
15671571
15681572

Doc/api/api.tex

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ \section{Embedding Python}
191191
(replacing \code{1.5} with the current interpreter version) relative
192192
to the parent directory where the executable named \code{python} is
193193
found on the shell command search path (the environment variable
194-
\code{$PATH}). For instance, if the Python executable is found in
194+
\code{\$PATH}). For instance, if the Python executable is found in
195195
\code{/usr/local/bin/python}, it will assume that the libraries are in
196196
\code{/usr/local/lib/python1.5}. In fact, this also the ``fallback''
197197
location, used when no executable file named \code{python} is found
@@ -202,7 +202,7 @@ \section{Embedding Python}
202202

203203
The embedding application can steer the search by calling
204204
\code{Py_SetProgramName(\var{file})} \emph{before} calling
205-
\code{Py_Initialize()}. Note that \code[$PYTHONHOME} still overrides
205+
\code{Py_Initialize()}. Note that \code{\$PYTHONHOME} still overrides
206206
this and \code{\$PYTHONPATH} is still inserted in front of the
207207
standard path.
208208

@@ -1451,19 +1451,19 @@ \chapter{Initialization, Finalization, and Threads}
14511451
\begin{cfuncdesc}{char *}{Py_GetProgramFullPath}{}
14521452
Return the full program name of the Python executable; this is
14531453
computed as a side-effect of deriving the default module search path
1454-
from the program name (set by \code{Py_SetProgramName() above). The
1454+
from the program name (set by \code{Py_SetProgramName()} above). The
14551455
returned string points into static storage; the caller should not
14561456
modify its value. The value is available to Python code as
14571457
\code{sys.executable}. % XXX is that the right sys.name?
14581458
\end{cfuncdesc}
14591459
14601460
\begin{cfuncdesc}{char *}{Py_GetPath}{}
14611461
Return the default module search path; this is computed from the
1462-
program name (set by \code{Py_SetProgramName() above) and some
1462+
program name (set by \code{Py_SetProgramName()} above) and some
14631463
environment variables. The returned string consists of a series of
14641464
directory names separated by a platform dependent delimiter character.
14651465
The delimiter character is \code{':'} on Unix, \code{';'} on
1466-
DOS/Windows, and \code{'\n'} (the ASCII newline character) on
1466+
DOS/Windows, and \code{'\\n'} (the ASCII newline character) on
14671467
Macintosh. The returned string points into static storage; the caller
14681468
should not modify its value. The value is available to Python code
14691469
as the list \code{sys.path}, which may be modified to change the
@@ -1476,7 +1476,9 @@ \chapter{Initialization, Finalization, and Threads}
14761476
Return the version of this Python interpreter. This is a string that
14771477
looks something like
14781478
1479-
\code{"1.5a3 (#67, Aug 1 1997, 22:34:28) [GCC 2.7.2.2]"}.
1479+
\begin{verbatim}
1480+
"1.5a3 (#67, Aug 1 1997, 22:34:28) [GCC 2.7.2.2]"
1481+
\end{verbatim}
14801482
14811483
The first word (up to the first space character) is the current Python
14821484
version; the first three characters are the major and minor version
@@ -1522,7 +1524,9 @@ \chapter{Initialization, Finalization, and Threads}
15221524
Return information about the sequence number and build date and time
15231525
of the current Python interpreter instance, for example
15241526
1525-
\code{"#67, Aug 1 1997, 22:34:28"}
1527+
\begin{verbatim}
1528+
"#67, Aug 1 1997, 22:34:28"
1529+
\end{verbatim}
15261530
15271531
The returned string points into static storage; the caller should not
15281532
modify its value. The value is available to Python code as part of
@@ -1556,13 +1560,13 @@ \section{Thread State and the Global Interpreter Lock}
15561560
\end{cfuncdesc}
15571561
15581562
% XXX These aren't really C functions!
1559-
\begin{cfuncdesc}{Py_BEGIN_ALLOW_THREADS}{}
1563+
\begin{cfuncdesc}{}{Py_BEGIN_ALLOW_THREADS}{}
15601564
\end{cfuncdesc}
15611565
1562-
\begin{cfuncdesc}{Py_BEGIN_END_THREADS}{}
1566+
\begin{cfuncdesc}{}{Py_BEGIN_END_THREADS}{}
15631567
\end{cfuncdesc}
15641568
1565-
\begin{cfuncdesc}{Py_BEGIN_XXX_THREADS}{}
1569+
\begin{cfuncdesc}{}{Py_BEGIN_XXX_THREADS}{}
15661570
\end{cfuncdesc}
15671571
15681572

0 commit comments

Comments
 (0)