[Python-checkins] CVS: python/dist/src/Objects classobject.c,2.128,2.129 funcobject.c,2.37,2.38
Fred L. Drake
fdrake@users.sourceforge.net
Thu, 03 May 2001 09:04:15 -0700
Update of /cvsroot/python/python/dist/src/Objects
In directory usw-pr-cvs1:/tmp/cvs-serv2979
Modified Files:
classobject.c funcobject.c
Log Message:
Since Py_TPFLAGS_HAVE_WEAKREFS is set in Py_TPFLAGS_DEFAULT, it does not
need to be specified in the type structures independently. The flag
exists only for binary compatibility.
This is a "source cleanliness" issue and introduces no behavioral changes.
Index: classobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/classobject.c,v
retrieving revision 2.128
retrieving revision 2.129
diff -C2 -r2.128 -r2.129
*** classobject.c 2001/04/30 14:39:18 2.128
--- classobject.c 2001/05/03 16:04:13 2.129
***************
*** 2104,2108 ****
(setattrofunc)instancemethod_setattro, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC | Py_TPFLAGS_HAVE_WEAKREFS,
0, /* tp_doc */
(traverseproc)instancemethod_traverse, /* tp_traverse */
--- 2104,2108 ----
(setattrofunc)instancemethod_setattro, /* tp_setattro */
0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
0, /* tp_doc */
(traverseproc)instancemethod_traverse, /* tp_traverse */
Index: funcobject.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Objects/funcobject.c,v
retrieving revision 2.37
retrieving revision 2.38
diff -C2 -r2.37 -r2.38
*** funcobject.c 2001/03/23 04:19:27 2.37
--- funcobject.c 2001/05/03 16:04:13 2.38
***************
*** 321,344 ****
sizeof(PyFunctionObject) + PyGC_HEAD_SIZE,
0,
! (destructor)func_dealloc, /*tp_dealloc*/
! 0, /*tp_print*/
! 0, /*tp_getattr*/
! 0, /*tp_setattr*/
! 0, /*tp_compare*/
! (reprfunc)func_repr, /*tp_repr*/
! 0, /*tp_as_number*/
! 0, /*tp_as_sequence*/
! 0, /*tp_as_mapping*/
! 0, /*tp_hash*/
! 0, /*tp_call*/
! 0, /*tp_str*/
! (getattrofunc)func_getattro, /*tp_getattro*/
! (setattrofunc)func_setattro, /*tp_setattro*/
! 0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC | Py_TPFLAGS_HAVE_WEAKREFS,
! 0, /* tp_doc */
! (traverseproc)func_traverse, /* tp_traverse */
! 0, /* tp_clear */
! 0, /* tp_richcompare */
offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */
};
--- 321,344 ----
sizeof(PyFunctionObject) + PyGC_HEAD_SIZE,
0,
! (destructor)func_dealloc, /* tp_dealloc */
! 0, /* tp_print */
! 0, /* tp_getattr */
! 0, /* tp_setattr */
! 0, /* tp_compare */
! (reprfunc)func_repr, /* tp_repr */
! 0, /* tp_as_number */
! 0, /* tp_as_sequence */
! 0, /* tp_as_mapping */
! 0, /* tp_hash */
! 0, /* tp_call */
! 0, /* tp_str */
! (getattrofunc)func_getattro, /* tp_getattro */
! (setattrofunc)func_setattro, /* tp_setattro */
! 0, /* tp_as_buffer */
! Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
! 0, /* tp_doc */
! (traverseproc)func_traverse, /* tp_traverse */
! 0, /* tp_clear */
! 0, /* tp_richcompare */
offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */
};