mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Make Socktype global so old and new compilers will like it.
This commit is contained in:
parent
b988c33d5a
commit
54ba21bd76
1 changed files with 4 additions and 6 deletions
|
@ -113,9 +113,7 @@ typedef struct {
|
||||||
/* A forward reference to the Socktype type object.
|
/* A forward reference to the Socktype type object.
|
||||||
The Socktype variable contains pointers to various functions,
|
The Socktype variable contains pointers to various functions,
|
||||||
some of which call newsocobject(), which uses Socktype, so
|
some of which call newsocobject(), which uses Socktype, so
|
||||||
there has to be a circular reference. If your compiler complains
|
there has to be a circular reference. */
|
||||||
that it is first declared 'extern' and later 'static', remove the
|
|
||||||
'static' keyword from the actual definition. */
|
|
||||||
|
|
||||||
extern typeobject Socktype; /* Forward */
|
extern typeobject Socktype; /* Forward */
|
||||||
|
|
||||||
|
@ -622,10 +620,10 @@ sock_getattr(s, name)
|
||||||
|
|
||||||
|
|
||||||
/* Type object for socket objects.
|
/* Type object for socket objects.
|
||||||
If your compiler complains that it is first declared 'extern'
|
XXX This should be static, but some compilers don't grok the
|
||||||
and later 'static', remove the 'static' keyword here. */
|
XXX forward reference to it in that case... */
|
||||||
|
|
||||||
static typeobject Socktype = {
|
typeobject Socktype = {
|
||||||
OB_HEAD_INIT(&Typetype)
|
OB_HEAD_INIT(&Typetype)
|
||||||
0,
|
0,
|
||||||
"socket",
|
"socket",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue