[binutils-gdb] Remove Py_TPFLAGS_CHECKTYPES
Tom Tromey
tromey@sourceware.org
Thu Oct 23 13:45:18 GMT 2025
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f20c97f00d29d0a4459a0606164ceb192fe6432b
commit f20c97f00d29d0a4459a0606164ceb192fe6432b
Author: Tom Tromey <tromey@adacore.com>
Date: Tue Oct 21 10:04:14 2025 -0600
Remove Py_TPFLAGS_CHECKTYPES
According to 'git annotate', the Py_TPFLAGS_CHECKTYPES was added to
python-internal.h way back when gdb was first ported to Python 3. It
was a compatibility fix for Python 2.
This is not needed any more, because Python 2 is no longer supported.
This patch removes the vestiges.
Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diff:
---
gdb/python/py-value.c | 3 +--
gdb/python/python-internal.h | 2 --
2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index 70dcb0c7ca2..c0784396009 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -2382,8 +2382,7 @@ PyTypeObject value_object_type = {
0, /*tp_getattro*/
0, /*tp_setattro*/
0, /*tp_as_buffer*/
- Py_TPFLAGS_DEFAULT | Py_TPFLAGS_CHECKTYPES
- | Py_TPFLAGS_BASETYPE, /*tp_flags*/
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /*tp_flags*/
"GDB value object", /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h
index e2baa6a70b5..54467ba49f3 100644
--- a/gdb/python/python-internal.h
+++ b/gdb/python/python-internal.h
@@ -90,8 +90,6 @@
static_assert (PY_VERSION_HEX >= 0x03040000);
-#define Py_TPFLAGS_CHECKTYPES 0
-
/* If Python.h does not define WITH_THREAD, then the various
GIL-related functions will not be defined. However,
PyGILState_STATE will be. */
More information about the Gdb-cvs
mailing list