]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove Py_TPFLAGS_CHECKTYPES
authorTom Tromey <tromey@adacore.com>
Tue, 21 Oct 2025 16:04:14 +0000 (10:04 -0600)
committerTom Tromey <tromey@adacore.com>
Thu, 23 Oct 2025 13:43:00 +0000 (07:43 -0600)
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>
gdb/python/py-value.c
gdb/python/python-internal.h

index 70dcb0c7ca24ca492640787770d2c4bab04e06bf..c0784396009b53605637385d598eb3a965e59b47 100644 (file)
@@ -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 */
index e2baa6a70b5504611969628640605488acb044bb..54467ba49f3015586b2fc8e7eb5f42f47166ac7c 100644 (file)
@@ -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.  */