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

Skip to content

Commit 57c179c

Browse files
committed
Remove staticforward and statichere
1 parent f84c38a commit 57c179c

3 files changed

Lines changed: 5 additions & 18 deletions

File tree

Include/object.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -685,21 +685,6 @@ PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */
685685
*/
686686
PyAPI_DATA(int) _Py_SwappedOp[];
687687

688-
/*
689-
Define staticforward and statichere for source compatibility with old
690-
C extensions.
691-
692-
The staticforward define was needed to support certain broken C
693-
compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the
694-
static keyword when it was used with a forward declaration of a static
695-
initialized structure. Standard C allows the forward declaration with
696-
static, and we've decided to stop catering to broken C compilers.
697-
(In fact, we expect that the compilers are all fixed eight years later.)
698-
*/
699-
700-
#define staticforward static
701-
#define statichere static
702-
703688

704689
/*
705690
More conventions

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ Core and Builtins
4747

4848
- input(), raw_input() and apply() are gone.
4949

50+
- Removed staticforward and statichere macros.
51+
5052
Extension Modules
5153
-----------------
5254

Modules/_sre.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ pattern_getattr(PatternObject* self, char* name)
27702770
return NULL;
27712771
}
27722772

2773-
statichere PyTypeObject Pattern_Type = {
2773+
static PyTypeObject Pattern_Type = {
27742774
PyObject_HEAD_INIT(NULL)
27752775
0, "_" SRE_MODULE ".SRE_Pattern",
27762776
sizeof(PatternObject), sizeof(SRE_CODE),
@@ -3251,7 +3251,7 @@ match_getattr(MatchObject* self, char* name)
32513251
/* FIXME: implement setattr("string", None) as a special case (to
32523252
detach the associated string, if any */
32533253

3254-
statichere PyTypeObject Match_Type = {
3254+
static PyTypeObject Match_Type = {
32553255
PyObject_HEAD_INIT(NULL)
32563256
0, "_" SRE_MODULE ".SRE_Match",
32573257
sizeof(MatchObject), sizeof(int),
@@ -3361,7 +3361,7 @@ scanner_getattr(ScannerObject* self, char* name)
33613361
return NULL;
33623362
}
33633363

3364-
statichere PyTypeObject Scanner_Type = {
3364+
static PyTypeObject Scanner_Type = {
33653365
PyObject_HEAD_INIT(NULL)
33663366
0, "_" SRE_MODULE ".SRE_Scanner",
33673367
sizeof(ScannerObject), 0,

0 commit comments

Comments
 (0)