Skip to content

Commit 4cabc8c

Browse files
committed
Remove Py_TPFLAGS_HAVE_FINALIZE macro
1 parent 782217f commit 4cabc8c

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

Include/object.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,6 @@ given type object has a specified feature.
595595
* Note that older extensions using the stable ABI set these flags,
596596
* so the bits must not be repurposed.
597597
*/
598-
#define Py_TPFLAGS_HAVE_FINALIZE (1UL << 0)
599598
#define Py_TPFLAGS_HAVE_VERSION_TAG (1UL << 18)
600599

601600

Modules/_testcapi/heaptype.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ static PyType_Spec HeapCTypeSubclassWithFinalizer_spec = {
710710
"_testcapi.HeapCTypeSubclassWithFinalizer",
711711
sizeof(HeapCTypeSubclassObject),
712712
0,
713-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_FINALIZE,
713+
Py_TPFLAGS_DEFAULT,
714714
HeapCTypeSubclassWithFinalizer_slots
715715
};
716716

Modules/_testmultiphase.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ static PyType_Spec StateAccessType_spec = {
289289
"_testimportexec.StateAccessType",
290290
sizeof(StateAccessTypeObject),
291291
0,
292-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_FINALIZE | Py_TPFLAGS_BASETYPE,
292+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,
293293
StateAccessType_Type_slots
294294
};
295295

Modules/posixmodule.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16325,8 +16325,7 @@ static PyType_Spec ScandirIteratorType_spec = {
1632516325
0,
1632616326
// bpo-40549: Py_TPFLAGS_BASETYPE should not be used, since
1632716327
// PyType_GetModule(Py_TYPE(self)) doesn't work on a subclass instance.
16328-
(Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_FINALIZE
16329-
| Py_TPFLAGS_DISALLOW_INSTANTIATION),
16328+
(Py_TPFLAGS_DEFAULT | Py_TPFLAGS_DISALLOW_INSTANTIATION),
1633016329
ScandirIteratorType_slots
1633116330
};
1633216331

0 commit comments

Comments
 (0)