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

Skip to content

Commit a3cd9bb

Browse files
committed
Remove now-obsolete staticforward/statichere discussion.
1 parent 938ace6 commit a3cd9bb

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

Doc/ext/newtypes.tex

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,14 @@ \section{The Basics
3838
The first bit that will be new is:
3939

4040
\begin{verbatim}
41-
staticforward PyTypeObject noddy_NoddyType;
41+
static PyTypeObject noddy_NoddyType;
4242
\end{verbatim}
4343

4444
This names the type object that will be defining further down in the
4545
file. It can't be defined here because its definition has to refer to
4646
functions that have no yet been defined, but we need to be able to
4747
refer to it, hence the declaration.
4848

49-
The \code{staticforward} is required to placate various brain dead
50-
compilers. The actual definition of the object declared using
51-
\code{staticforward} should use \code{statichere} instead of
52-
\keyword{static}.
53-
5449
\begin{verbatim}
5550
typedef struct {
5651
PyObject_HEAD
@@ -156,7 +151,7 @@ \section{The Basics
156151
Moving on, we come to the crunch --- the type object.
157152

158153
\begin{verbatim}
159-
statichere PyTypeObject noddy_NoddyType = {
154+
static PyTypeObject noddy_NoddyType = {
160155
PyObject_HEAD_INIT(NULL)
161156
0, /* ob_size */
162157
"Noddy", /* tp_name */
@@ -175,9 +170,6 @@ \section{The Basics
175170
};
176171
\end{verbatim}
177172

178-
(Note the use of \code{statichere} instead of \keyword{static}, since
179-
we used \code{staticforward} in the declaration.)
180-
181173
Now if you go and look up the definition of \ctype{PyTypeObject} in
182174
\file{object.h} you'll see that it has many, many more fields that the
183175
definition above. The remaining fields will be filled with zeros by

0 commit comments

Comments
 (0)