Commit 4dcb85b8 authored by Fred Drake's avatar Fred Drake

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.
parent efdae393
...@@ -2103,7 +2103,7 @@ PyTypeObject PyMethod_Type = { ...@@ -2103,7 +2103,7 @@ PyTypeObject PyMethod_Type = {
(getattrofunc)instancemethod_getattro, /* tp_getattro */ (getattrofunc)instancemethod_getattro, /* tp_getattro */
(setattrofunc)instancemethod_setattro, /* tp_setattro */ (setattrofunc)instancemethod_setattro, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC | Py_TPFLAGS_HAVE_WEAKREFS, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
0, /* tp_doc */ 0, /* tp_doc */
(traverseproc)instancemethod_traverse, /* tp_traverse */ (traverseproc)instancemethod_traverse, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
......
...@@ -320,25 +320,25 @@ PyTypeObject PyFunction_Type = { ...@@ -320,25 +320,25 @@ PyTypeObject PyFunction_Type = {
"function", "function",
sizeof(PyFunctionObject) + PyGC_HEAD_SIZE, sizeof(PyFunctionObject) + PyGC_HEAD_SIZE,
0, 0,
(destructor)func_dealloc, /*tp_dealloc*/ (destructor)func_dealloc, /* tp_dealloc */
0, /*tp_print*/ 0, /* tp_print */
0, /*tp_getattr*/ 0, /* tp_getattr */
0, /*tp_setattr*/ 0, /* tp_setattr */
0, /*tp_compare*/ 0, /* tp_compare */
(reprfunc)func_repr, /*tp_repr*/ (reprfunc)func_repr, /* tp_repr */
0, /*tp_as_number*/ 0, /* tp_as_number */
0, /*tp_as_sequence*/ 0, /* tp_as_sequence */
0, /*tp_as_mapping*/ 0, /* tp_as_mapping */
0, /*tp_hash*/ 0, /* tp_hash */
0, /*tp_call*/ 0, /* tp_call */
0, /*tp_str*/ 0, /* tp_str */
(getattrofunc)func_getattro, /*tp_getattro*/ (getattrofunc)func_getattro, /* tp_getattro */
(setattrofunc)func_setattro, /*tp_setattro*/ (setattrofunc)func_setattro, /* tp_setattro */
0, /* tp_as_buffer */ 0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC | Py_TPFLAGS_HAVE_WEAKREFS, Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC, /* tp_flags */
0, /* tp_doc */ 0, /* tp_doc */
(traverseproc)func_traverse, /* tp_traverse */ (traverseproc)func_traverse, /* tp_traverse */
0, /* tp_clear */ 0, /* tp_clear */
0, /* tp_richcompare */ 0, /* tp_richcompare */
offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */ offsetof(PyFunctionObject, func_weakreflist), /* tp_weaklistoffset */
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment