aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-linetable.c
diff options
context:
space:
mode:
authorMatthieu Longo <matthieu.longo@arm.com>2026-01-27 12:33:42 +0000
committerMatthieu Longo <matthieu.longo@arm.com>2026-01-29 16:46:14 +0000
commit91bf037a394e4bc1dc885aed39fc745fd516fe56 (patch)
tree19d4b02d4b95b31a41bb5452c51042c1fdf7c0a9 /gdb/python/py-linetable.c
parent1fe7c3b74924ab69da0469fd93a9de089843e65d (diff)
downloadbinutils-91bf037a394e4bc1dc885aed39fc745fd516fe56.tar.gz
binutils-91bf037a394e4bc1dc885aed39fc745fd516fe56.tar.bz2
binutils-91bf037a394e4bc1dc885aed39fc745fd516fe56.zip
gdb: make remaining Python extension objects inherit from PyObject
Previous patches made some Python extension objects ipublicly inherit directly or indirectly from PyObject. In the interest of consistency, this patch makes all remaining Python extension objects still not inheriting from PyObject do so. Approved-By: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gdb/python/py-linetable.c')
-rw-r--r--gdb/python/py-linetable.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c
index 0ea2d843dd3..384ced68a32 100644
--- a/gdb/python/py-linetable.c
+++ b/gdb/python/py-linetable.c
@@ -19,8 +19,8 @@
#include "python-internal.h"
-struct linetable_entry_object {
- PyObject_HEAD
+struct linetable_entry_object : public PyObject
+{
/* The line table source line. */
int line;
/* The pc associated with the source line. */
@@ -29,8 +29,8 @@ struct linetable_entry_object {
extern PyTypeObject linetable_entry_object_type;
-struct linetable_object {
- PyObject_HEAD
+struct linetable_object : public PyObject
+{
/* The symtab python object. We store the Python object here as the
underlying symtab can become invalid, and we have to run validity
checks on it. */
@@ -39,8 +39,8 @@ struct linetable_object {
extern PyTypeObject linetable_object_type;
-struct ltpy_iterator_object {
- PyObject_HEAD
+struct ltpy_iterator_object : public PyObject
+{
/* The current entry in the line table for the iterator */
int current_index;
/* Pointer back to the original source line table object. Needed to