mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
staticforward bites the dust.
The staticforward define was needed to support certain broken C compilers (notably SCO ODT 3.0, perhaps early AIX as well) botched the static keyword when it was used with a forward declaration of a static initialized structure. Standard C allows the forward declaration with static, and we've decided to stop catering to broken C compilers. (In fact, we expect that the compilers are all fixed eight years later.) I'm leaving staticforward and statichere defined in object.h as static. This is only for backwards compatibility with C extensions that might still use it. XXX I haven't updated the documentation.
This commit is contained in:
parent
9cb64b954a
commit
938ace69a0
61 changed files with 126 additions and 222 deletions
|
@ -233,7 +233,7 @@ typedef struct {
|
|||
NavReplyRecord itself;
|
||||
} navrrobject;
|
||||
|
||||
staticforward PyTypeObject Navrrtype;
|
||||
static PyTypeObject Navrrtype;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -471,7 +471,7 @@ typedef struct {
|
|||
char name[MAXNAME+1];
|
||||
} cdfobject;
|
||||
|
||||
staticforward PyTypeObject Cdftype;
|
||||
static PyTypeObject Cdftype;
|
||||
|
||||
|
||||
|
||||
|
@ -485,7 +485,7 @@ typedef struct {
|
|||
char name[MAXNAME+1];
|
||||
} cdrobject;
|
||||
|
||||
staticforward PyTypeObject Cdrtype;
|
||||
static PyTypeObject Cdrtype;
|
||||
|
||||
|
||||
|
||||
|
@ -503,7 +503,7 @@ typedef struct {
|
|||
conventry *argconv[MAXARG]; /* Value converter list */
|
||||
} cdcobject;
|
||||
|
||||
staticforward PyTypeObject Cdctype;
|
||||
static PyTypeObject Cdctype;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ typedef struct {
|
|||
int err; /* Error to pass to the callback */
|
||||
} ctbcmobject;
|
||||
|
||||
staticforward PyTypeObject ctbcmtype;
|
||||
static PyTypeObject ctbcmtype;
|
||||
|
||||
#define is_ctbcmobject(v) ((v)->ob_type == &ctbcmtype)
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ extern int _CtlObj_Convert(PyObject *, ControlHandle *);
|
|||
#define CtlObj_Convert _CtlObj_Convert
|
||||
#endif
|
||||
|
||||
staticforward PyObject *CtlObj_WhichControl(ControlHandle);
|
||||
static PyObject *CtlObj_WhichControl(ControlHandle);
|
||||
|
||||
#define as_Control(h) ((ControlHandle)h)
|
||||
#define as_Resource(ctl) ((Handle)ctl)
|
||||
|
@ -139,9 +139,9 @@ static ControlUserPaneIdleUPP myidleproc_upp;
|
|||
static ControlUserPaneHitTestUPP myhittestproc_upp;
|
||||
static ControlUserPaneTrackingUPP mytrackingproc_upp;
|
||||
|
||||
staticforward int settrackfunc(PyObject *); /* forward */
|
||||
staticforward void clrtrackfunc(void); /* forward */
|
||||
staticforward int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
||||
static int settrackfunc(PyObject *); /* forward */
|
||||
static void clrtrackfunc(void); /* forward */
|
||||
static int setcallback(PyObject *, OSType, PyObject *, UniversalProcPtr *);
|
||||
|
||||
static PyObject *Ctl_Error;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ typedef struct {
|
|||
short forkref;
|
||||
} forkRefObject;
|
||||
|
||||
staticforward PyTypeObject forkRefObject_Type;
|
||||
static PyTypeObject forkRefObject_Type;
|
||||
|
||||
#define forkRefObject_Check(v) ((v)->ob_type == &forkRefObject_Type)
|
||||
|
||||
|
@ -359,7 +359,7 @@ typedef struct {
|
|||
FSIterator iterator;
|
||||
} iteratorObject;
|
||||
|
||||
staticforward PyTypeObject iteratorObject_Type;
|
||||
static PyTypeObject iteratorObject_Type;
|
||||
|
||||
#define iteratorObject_Check(v) ((v)->ob_type == &iteratorObject_Type)
|
||||
|
||||
|
@ -534,7 +534,7 @@ typedef struct {
|
|||
Boolean directory;
|
||||
} fsRefObject;
|
||||
|
||||
staticforward PyTypeObject fsRefObject_Type;
|
||||
static PyTypeObject fsRefObject_Type;
|
||||
|
||||
#define fsRefObject_Check(v) ((v)->ob_type == &fsRefObject_Type)
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ typedef struct {
|
|||
ICInstance inst;
|
||||
} iciobject;
|
||||
|
||||
staticforward PyTypeObject Icitype;
|
||||
static PyTypeObject Icitype;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -70,7 +70,7 @@ typedef struct {
|
|||
AliasHandle alias;
|
||||
} mfsaobject;
|
||||
|
||||
staticforward PyTypeObject Mfsatype;
|
||||
static PyTypeObject Mfsatype;
|
||||
|
||||
#define is_mfsaobject(v) ((v)->ob_type == &Mfsatype)
|
||||
|
||||
|
@ -82,7 +82,7 @@ typedef struct {
|
|||
FSSpec fsspec;
|
||||
} mfssobject;
|
||||
|
||||
staticforward PyTypeObject Mfsstype;
|
||||
static PyTypeObject Mfsstype;
|
||||
|
||||
#define is_mfssobject(v) ((v)->ob_type == &Mfsstype)
|
||||
|
||||
|
@ -94,7 +94,7 @@ typedef struct {
|
|||
FSRef fsref;
|
||||
} mfsrobject;
|
||||
|
||||
staticforward PyTypeObject Mfsrtype;
|
||||
static PyTypeObject Mfsrtype;
|
||||
|
||||
#define is_mfsrobject(v) ((v)->ob_type == &Mfsrtype)
|
||||
|
||||
|
@ -107,13 +107,13 @@ typedef struct {
|
|||
FInfo finfo;
|
||||
} mfsiobject;
|
||||
|
||||
staticforward PyTypeObject Mfsitype;
|
||||
static PyTypeObject Mfsitype;
|
||||
|
||||
#define is_mfsiobject(v) ((v)->ob_type == &Mfsitype)
|
||||
|
||||
|
||||
staticforward mfssobject *newmfssobject(FSSpec *fss); /* Forward */
|
||||
staticforward mfsrobject *newmfsrobject(FSRef *fsr); /* Forward */
|
||||
static mfssobject *newmfssobject(FSSpec *fss); /* Forward */
|
||||
static mfsrobject *newmfsrobject(FSRef *fsr); /* Forward */
|
||||
|
||||
/* ---------------------------------------------------------------- */
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct {
|
|||
int isclosed;
|
||||
} rfobject;
|
||||
|
||||
staticforward PyTypeObject Rftype;
|
||||
static PyTypeObject Rftype;
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ typedef struct {
|
|||
PyObject *curtext; /* If non-NULL current text being spoken */
|
||||
} scobject;
|
||||
|
||||
staticforward PyTypeObject sctype;
|
||||
static PyTypeObject sctype;
|
||||
|
||||
#define is_scobject(v) ((v)->ob_type == &sctype)
|
||||
|
||||
|
@ -285,7 +285,7 @@ typedef struct {
|
|||
VoiceDescription vd;
|
||||
} mvobject;
|
||||
|
||||
staticforward PyTypeObject mvtype;
|
||||
static PyTypeObject mvtype;
|
||||
|
||||
#define is_mvobject(v) ((v)->ob_type == &mvtype)
|
||||
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
#endif
|
||||
|
||||
/* For now we declare them forward here. They'll go to mactoolbox later */
|
||||
staticforward PyObject *TXNObj_New(TXNObject);
|
||||
staticforward int TXNObj_Convert(PyObject *, TXNObject *);
|
||||
staticforward PyObject *TXNFontMenuObj_New(TXNFontMenuObject);
|
||||
staticforward int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
|
||||
static PyObject *TXNObj_New(TXNObject);
|
||||
static int TXNObj_Convert(PyObject *, TXNObject *);
|
||||
static PyObject *TXNFontMenuObj_New(TXNFontMenuObject);
|
||||
static int TXNFontMenuObj_Convert(PyObject *, TXNFontMenuObject *);
|
||||
|
||||
// ADD declarations
|
||||
#ifdef NOTYET_USE_TOOLBOX_OBJECT_GLUE
|
||||
|
|
|
@ -111,7 +111,7 @@ extern int _QdRGB_Convert(PyObject *, RGBColorPtr);
|
|||
#define QDIsPortBuffered(port) 0
|
||||
#endif /* !TARGET_API_MAC_CARBON */
|
||||
|
||||
staticforward PyObject *BMObj_NewCopied(BitMapPtr);
|
||||
static PyObject *BMObj_NewCopied(BitMapPtr);
|
||||
|
||||
/*
|
||||
** Parse/generate RGB records
|
||||
|
@ -527,7 +527,7 @@ PyTypeObject BitMap_Type = {
|
|||
|
||||
/* ------------------ Object type QDGlobalsAccess ------------------- */
|
||||
|
||||
staticforward PyTypeObject QDGlobalsAccess_Type;
|
||||
static PyTypeObject QDGlobalsAccess_Type;
|
||||
|
||||
#define QDGA_Check(x) ((x)->ob_type == &QDGlobalsAccess_Type)
|
||||
|
||||
|
@ -631,7 +631,7 @@ static PyObject *QDGA_getattr(QDGlobalsAccessObject *self, char *name)
|
|||
|
||||
#define QDGA_hash NULL
|
||||
|
||||
staticforward PyTypeObject QDGlobalsAccess_Type = {
|
||||
static PyTypeObject QDGlobalsAccess_Type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
"_Qd.QDGlobalsAccess", /*tp_name*/
|
||||
|
|
|
@ -62,7 +62,7 @@ static PyObject *Snd_Error;
|
|||
|
||||
/* --------------------- Object type SndChannel --------------------- */
|
||||
|
||||
staticforward PyTypeObject SndChannel_Type;
|
||||
static PyTypeObject SndChannel_Type;
|
||||
|
||||
#define SndCh_Check(x) ((x)->ob_type == &SndChannel_Type)
|
||||
|
||||
|
@ -315,7 +315,7 @@ static PyObject *SndCh_getattr(SndChannelObject *self, char *name)
|
|||
|
||||
#define SndCh_hash NULL
|
||||
|
||||
staticforward PyTypeObject SndChannel_Type = {
|
||||
static PyTypeObject SndChannel_Type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
"_Snd.SndChannel", /*tp_name*/
|
||||
|
@ -339,7 +339,7 @@ staticforward PyTypeObject SndChannel_Type = {
|
|||
|
||||
/* ------------------------ Object type SPB ------------------------- */
|
||||
|
||||
staticforward PyTypeObject SPB_Type;
|
||||
static PyTypeObject SPB_Type;
|
||||
|
||||
#define SPBObj_Check(x) ((x)->ob_type == &SPB_Type)
|
||||
|
||||
|
@ -443,7 +443,7 @@ static int SPBObj_setattr(SPBObject *self, char *name, PyObject *value)
|
|||
|
||||
#define SPBObj_hash NULL
|
||||
|
||||
staticforward PyTypeObject SPB_Type = {
|
||||
static PyTypeObject SPB_Type = {
|
||||
PyObject_HEAD_INIT(NULL)
|
||||
0, /*ob_size*/
|
||||
"_Snd.SPB", /*tp_name*/
|
||||
|
|
|
@ -33,8 +33,8 @@ extern PyObject *AEDesc_New(AppleEvent *);
|
|||
extern int AEDesc_Convert(PyObject *, AppleEvent *);
|
||||
|
||||
/* Forward declaration */
|
||||
staticforward PyObject *WEOObj_New(WEObjectReference);
|
||||
staticforward PyObject *ExistingwasteObj_New(WEReference);
|
||||
static PyObject *WEOObj_New(WEObjectReference);
|
||||
static PyObject *ExistingwasteObj_New(WEReference);
|
||||
|
||||
/*
|
||||
** Parse/generate TextStyle records
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue