[Python-checkins] python/dist/src/Objects dictobject.c,2.127,2.128 floatobject.c,2.113,2.114 intobject.c,2.84,2.85 listobject.c,2.120,2.121 longobject.c,1.119,1.120 rangeobject.c,2.42,2.43 stringobject.c,2.169,2.170 tupleobject.c,2.69,2.70 typeobject.c,2.160,2.161 unicodeobject.c,2.155,2.156 xxobject.c,2.20,2.21

jhylton@users.sourceforge.net jhylton@users.sourceforge.net
2002年7月17日 09:30:40 -0700


Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv17711/Objects
Modified Files:
	dictobject.c floatobject.c intobject.c listobject.c 
	longobject.c rangeobject.c stringobject.c tupleobject.c 
	typeobject.c unicodeobject.c xxobject.c 
Log Message:
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.
Index: dictobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/dictobject.c,v
retrieving revision 2.127
retrieving revision 2.128
diff -C2 -d -r2.127 -r2.128
*** dictobject.c	16 Jul 2002 20:30:22 -0000	2.127
--- dictobject.c	17 Jul 2002 16:30:37 -0000	2.128
***************
*** 1612,1616 ****
 
 
! staticforward PyObject *dictiter_new(dictobject *, binaryfunc);
 
 static PyObject *
--- 1612,1616 ----
 
 
! static PyObject *dictiter_new(dictobject *, binaryfunc);
 
 static PyObject *
Index: floatobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/floatobject.c,v
retrieving revision 2.113
retrieving revision 2.114
diff -C2 -d -r2.113 -r2.114
*** floatobject.c	13 Jun 2002 20:33:00 -0000	2.113
--- floatobject.c	17 Jul 2002 16:30:38 -0000	2.114
***************
*** 679,683 ****
 
 
! staticforward PyObject *
 float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 679,683 ----
 
 
! static PyObject *
 float_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: intobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/intobject.c,v
retrieving revision 2.84
retrieving revision 2.85
diff -C2 -d -r2.84 -r2.85
*** intobject.c	13 Jun 2002 20:33:00 -0000	2.84
--- intobject.c	17 Jul 2002 16:30:38 -0000	2.85
***************
*** 776,780 ****
 }
 
! staticforward PyObject *
 int_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 776,780 ----
 }
 
! static PyObject *
 int_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: listobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/listobject.c,v
retrieving revision 2.120
retrieving revision 2.121
diff -C2 -d -r2.120 -r2.121
*** listobject.c	16 Jul 2002 20:10:23 -0000	2.120
--- listobject.c	17 Jul 2002 16:30:38 -0000	2.121
***************
*** 1283,1287 ****
 #undef SETK
 
! staticforward PyTypeObject immutable_list_type;
 
 static PyObject *
--- 1283,1287 ----
 #undef SETK
 
! static PyTypeObject immutable_list_type;
 
 static PyObject *
Index: longobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/longobject.c,v
retrieving revision 1.119
retrieving revision 1.120
diff -C2 -d -r1.119 -r1.120
*** longobject.c	13 Jul 2002 14:31:51 -0000	1.119
--- longobject.c	17 Jul 2002 16:30:38 -0000	1.120
***************
*** 2200,2204 ****
 	return long_format(v, 16, 1);
 }
! staticforward PyObject *
 long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 2200,2205 ----
 	return long_format(v, 16, 1);
 }
! 
! static PyObject *
 long_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: rangeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/rangeobject.c,v
retrieving revision 2.42
retrieving revision 2.43
diff -C2 -d -r2.42 -r2.43
*** rangeobject.c	16 Jul 2002 20:47:50 -0000	2.42
--- rangeobject.c	17 Jul 2002 16:30:38 -0000	2.43
***************
*** 164,168 ****
 };
 
! staticforward PyObject * range_iter(PyObject *seq);
 
 PyTypeObject PyRange_Type = {
--- 164,168 ----
 };
 
! static PyObject * range_iter(PyObject *seq);
 
 PyTypeObject PyRange_Type = {
***************
*** 218,222 ****
 } rangeiterobject;
 
! staticforward PyTypeObject Pyrangeiter_Type;
 
 static PyObject *
--- 218,222 ----
 } rangeiterobject;
 
! static PyTypeObject Pyrangeiter_Type;
 
 static PyObject *
Index: stringobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/stringobject.c,v
retrieving revision 2.169
retrieving revision 2.170
diff -C2 -d -r2.169 -r2.170
*** stringobject.c	11 Jul 2002 06:23:50 -0000	2.169
--- stringobject.c	17 Jul 2002 16:30:38 -0000	2.170
***************
*** 2865,2869 ****
 };
 
! staticforward PyObject *
 str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 2865,2869 ----
 };
 
! static PyObject *
 str_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: tupleobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/tupleobject.c,v
retrieving revision 2.69
retrieving revision 2.70
diff -C2 -d -r2.69 -r2.70
*** tupleobject.c	11 Jul 2002 06:23:50 -0000	2.69
--- tupleobject.c	17 Jul 2002 16:30:38 -0000	2.70
***************
*** 480,484 ****
 }
 
! staticforward PyObject *
 tuple_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 480,484 ----
 }
 
! static PyObject *
 tuple_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: typeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/typeobject.c,v
retrieving revision 2.160
retrieving revision 2.161
diff -C2 -d -r2.160 -r2.161
*** typeobject.c	16 Jul 2002 19:39:38 -0000	2.160
--- typeobject.c	17 Jul 2002 16:30:38 -0000	2.161
***************
*** 357,361 ****
 }
 
! staticforward PyObject *lookup_maybe(PyObject *, char *, PyObject **);
 
 static int
--- 357,361 ----
 }
 
! static PyObject *lookup_maybe(PyObject *, char *, PyObject **);
 
 static int
***************
*** 470,474 ****
 }
 
! staticforward PyTypeObject *solid_base(PyTypeObject *type);
 
 /* type test with subclassing support */
--- 470,474 ----
 }
 
! static PyTypeObject *solid_base(PyTypeObject *type);
 
 /* type test with subclassing support */
***************
*** 895,902 ****
 }
 
! staticforward void object_dealloc(PyObject *);
! staticforward int object_init(PyObject *, PyObject *, PyObject *);
! staticforward int update_slot(PyTypeObject *, PyObject *);
! staticforward void fixup_slot_dispatchers(PyTypeObject *);
 
 static PyObject *
--- 895,902 ----
 }
 
! static void object_dealloc(PyObject *);
! static int object_init(PyObject *, PyObject *, PyObject *);
! static int update_slot(PyTypeObject *, PyObject *);
! static void fixup_slot_dispatchers(PyTypeObject *);
 
 static PyObject *
***************
*** 2188,2193 ****
 }
 
! staticforward int add_operators(PyTypeObject *);
! staticforward int add_subclass(PyTypeObject *base, PyTypeObject *type);
 
 int
--- 2188,2193 ----
 }
 
! static int add_operators(PyTypeObject *);
! static int add_subclass(PyTypeObject *base, PyTypeObject *type);
 
 int
***************
*** 3119,3123 ****
 SLOT1BIN(slot_nb_divmod, nb_divmod, "__divmod__", "__rdivmod__")
 
! staticforward PyObject *slot_nb_power(PyObject *, PyObject *, PyObject *);
 
 SLOT1BINFULL(slot_nb_power_binary, slot_nb_power,
--- 3119,3123 ----
 SLOT1BIN(slot_nb_divmod, nb_divmod, "__divmod__", "__rdivmod__")
 
! static PyObject *slot_nb_power(PyObject *, PyObject *, PyObject *);
 
 SLOT1BINFULL(slot_nb_power_binary, slot_nb_power,
***************
*** 4014,4019 ****
 }
 
! staticforward int recurse_down_subclasses(PyTypeObject *type,
! 					 slotdef **pp, PyObject *name);
 
 /* In the type, update the slots whose slotdefs are gathered in the pp0 array,
--- 4014,4019 ----
 }
 
! static int recurse_down_subclasses(PyTypeObject *type, slotdef **pp, 
! 				 PyObject *name);
 
 /* In the type, update the slots whose slotdefs are gathered in the pp0 array,
Index: unicodeobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/unicodeobject.c,v
retrieving revision 2.155
retrieving revision 2.156
diff -C2 -d -r2.155 -r2.156
*** unicodeobject.c	30 Jun 2002 15:26:10 -0000	2.155
--- unicodeobject.c	17 Jul 2002 16:30:38 -0000	2.156
***************
*** 5797,5801 ****
 };
 
! staticforward PyObject *
 unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
--- 5797,5801 ----
 };
 
! static PyObject *
 unicode_subtype_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 
Index: xxobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/xxobject.c,v
retrieving revision 2.20
retrieving revision 2.21
diff -C2 -d -r2.20 -r2.21
*** xxobject.c	23 May 2002 15:51:20 -0000	2.20
--- xxobject.c	17 Jul 2002 16:30:38 -0000	2.21
***************
*** 19,23 ****
 } xxobject;
 
! staticforward PyTypeObject Xxtype;
 
 #define is_xxobject(v)		((v)->ob_type == &Xxtype)
--- 19,23 ----
 } xxobject;
 
! static PyTypeObject Xxtype;
 
 #define is_xxobject(v)		((v)->ob_type == &Xxtype)

AltStyle によって変換されたページ (->オリジナル) /