aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-symtab.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-symtab.c')
-rw-r--r--gdb/python/py-symtab.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/gdb/python/py-symtab.c b/gdb/python/py-symtab.c
index c023ad5..d3e95db 100644
--- a/gdb/python/py-symtab.c
+++ b/gdb/python/py-symtab.c
@@ -307,7 +307,7 @@ salpy_dealloc (PyObject *self)
Py_DECREF (self_sal->symtab);
xfree (self_sal->sal);
- self_sal->ob_type->tp_free (self);
+ Py_TYPE (self)->tp_free (self);
}
/* Given a sal, and a sal_object that has previously been allocated
@@ -539,8 +539,7 @@ Return the static block of the symbol table." },
};
static PyTypeObject symtab_object_type = {
- PyObject_HEAD_INIT (NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Symtab", /*tp_name*/
sizeof (symtab_object), /*tp_basicsize*/
0, /*tp_itemsize*/
@@ -590,8 +589,7 @@ Return true if this symbol table and line is valid, false if not." },
};
static PyTypeObject sal_object_type = {
- PyObject_HEAD_INIT (NULL)
- 0, /*ob_size*/
+ PyVarObject_HEAD_INIT (NULL, 0)
"gdb.Symtab_and_line", /*tp_name*/
sizeof (sal_object), /*tp_basicsize*/
0, /*tp_itemsize*/