Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9faf4c5

Browse files
committed
Change title to {Python/C API Reference Manual}; remove \bcode \ecode
which appears to be out of fashion in this file.
1 parent 46a0bb4 commit 9faf4c5

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

Doc/api.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\documentstyle[twoside,11pt,myformat]{report}
22

3-
\title{Python/C API Reference}
3+
\title{Python/C API Reference Manual}
44

55
\input{boilerplate}
66

@@ -1058,13 +1058,13 @@ \section{Importing modules}
10581058
This is the structure type definition for frozen module descriptors,
10591059
as generated by the \code{freeze} utility (see \file{Tools/freeze/} in
10601060
the Python source distribution). Its definition is:
1061-
\bcode\begin{verbatim}
1061+
\begin{verbatim}
10621062
struct _frozen {
10631063
char *name;
10641064
unsigned char *code;
10651065
int size;
10661066
};
1067-
\end{verbatim}\ecode
1067+
\end{verbatim}
10681068
\end{ctypedesc}
10691069
10701070
\begin{cvardesc}{struct _frozen *}{PyImport_FrozenModules}
@@ -2047,21 +2047,21 @@ \section{Thread State and the Global Interpreter Lock}
20472047
This is easy enough in most cases. Most code manipulating the global
20482048
interpreter lock has the following simple structure:
20492049
2050-
\bcode\begin{verbatim}
2050+
\begin{verbatim}
20512051
Save the thread state in a local variable.
20522052
Release the interpreter lock.
20532053
...Do some blocking I/O operation...
20542054
Reacquire the interpreter lock.
20552055
Restore the thread state from the local variable.
2056-
\end{verbatim}\ecode
2056+
\end{verbatim}
20572057
20582058
This is so common that a pair of macros exists to simplify it:
20592059
2060-
\bcode\begin{verbatim}
2060+
\begin{verbatim}
20612061
Py_BEGIN_ALLOW_THREADS
20622062
...Do some blocking I/O operation...
20632063
Py_END_ALLOW_THREADS
2064-
\end{verbatim}\ecode
2064+
\end{verbatim}
20652065
20662066
The BEGIN macro opens a new block and declares a hidden local
20672067
variable; the END macro closes the block. Another advantage of using
@@ -2072,19 +2072,19 @@ \section{Thread State and the Global Interpreter Lock}
20722072
When thread support is enabled, the block above expands to the
20732073
following code:
20742074
2075-
\bcode\begin{verbatim}
2075+
\begin{verbatim}
20762076
{
20772077
PyThreadState *_save;
20782078
_save = PyEval_SaveThread();
20792079
...Do some blocking I/O operation...
20802080
PyEval_RestoreThread(_save);
20812081
}
2082-
\end{verbatim}\ecode
2082+
\end{verbatim}
20832083
20842084
Using even lower level primitives, we can get roughly the same effect
20852085
as follows:
20862086
2087-
\bcode\begin{verbatim}
2087+
\begin{verbatim}
20882088
{
20892089
PyThreadState *_save;
20902090
_save = PyThreadState_Swap(NULL);
@@ -2093,7 +2093,7 @@ \section{Thread State and the Global Interpreter Lock}
20932093
PyEval_AcquireLock();
20942094
PyThreadState_Swap(_save);
20952095
}
2096-
\end{verbatim}\ecode
2096+
\end{verbatim}
20972097
20982098
There are some subtle differences; in particular,
20992099
\code{PyEval_RestoreThread()} saves and restores the value of the

Doc/api/api.tex

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
\documentstyle[twoside,11pt,myformat]{report}
22

3-
\title{Python/C API Reference}
3+
\title{Python/C API Reference Manual}
44

55
\input{boilerplate}
66

@@ -1058,13 +1058,13 @@ \section{Importing modules}
10581058
This is the structure type definition for frozen module descriptors,
10591059
as generated by the \code{freeze} utility (see \file{Tools/freeze/} in
10601060
the Python source distribution). Its definition is:
1061-
\bcode\begin{verbatim}
1061+
\begin{verbatim}
10621062
struct _frozen {
10631063
char *name;
10641064
unsigned char *code;
10651065
int size;
10661066
};
1067-
\end{verbatim}\ecode
1067+
\end{verbatim}
10681068
\end{ctypedesc}
10691069
10701070
\begin{cvardesc}{struct _frozen *}{PyImport_FrozenModules}
@@ -2047,21 +2047,21 @@ \section{Thread State and the Global Interpreter Lock}
20472047
This is easy enough in most cases. Most code manipulating the global
20482048
interpreter lock has the following simple structure:
20492049
2050-
\bcode\begin{verbatim}
2050+
\begin{verbatim}
20512051
Save the thread state in a local variable.
20522052
Release the interpreter lock.
20532053
...Do some blocking I/O operation...
20542054
Reacquire the interpreter lock.
20552055
Restore the thread state from the local variable.
2056-
\end{verbatim}\ecode
2056+
\end{verbatim}
20572057
20582058
This is so common that a pair of macros exists to simplify it:
20592059
2060-
\bcode\begin{verbatim}
2060+
\begin{verbatim}
20612061
Py_BEGIN_ALLOW_THREADS
20622062
...Do some blocking I/O operation...
20632063
Py_END_ALLOW_THREADS
2064-
\end{verbatim}\ecode
2064+
\end{verbatim}
20652065
20662066
The BEGIN macro opens a new block and declares a hidden local
20672067
variable; the END macro closes the block. Another advantage of using
@@ -2072,19 +2072,19 @@ \section{Thread State and the Global Interpreter Lock}
20722072
When thread support is enabled, the block above expands to the
20732073
following code:
20742074
2075-
\bcode\begin{verbatim}
2075+
\begin{verbatim}
20762076
{
20772077
PyThreadState *_save;
20782078
_save = PyEval_SaveThread();
20792079
...Do some blocking I/O operation...
20802080
PyEval_RestoreThread(_save);
20812081
}
2082-
\end{verbatim}\ecode
2082+
\end{verbatim}
20832083
20842084
Using even lower level primitives, we can get roughly the same effect
20852085
as follows:
20862086
2087-
\bcode\begin{verbatim}
2087+
\begin{verbatim}
20882088
{
20892089
PyThreadState *_save;
20902090
_save = PyThreadState_Swap(NULL);
@@ -2093,7 +2093,7 @@ \section{Thread State and the Global Interpreter Lock}
20932093
PyEval_AcquireLock();
20942094
PyThreadState_Swap(_save);
20952095
}
2096-
\end{verbatim}\ecode
2096+
\end{verbatim}
20972097
20982098
There are some subtle differences; in particular,
20992099
\code{PyEval_RestoreThread()} saves and restores the value of the

0 commit comments

Comments
 (0)