diff options
Diffstat (limited to 'gdb/python/py-linetable.c')
-rw-r--r-- | gdb/python/py-linetable.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/gdb/python/py-linetable.c b/gdb/python/py-linetable.c index e3e71f9..8c0a6cc 100644 --- a/gdb/python/py-linetable.c +++ b/gdb/python/py-linetable.c @@ -287,27 +287,11 @@ ltpy_dealloc (PyObject *self) static int CPYCHECKER_NEGATIVE_RESULT_SETS_EXCEPTION gdbpy_initialize_linetable (void) { - if (PyType_Ready (&linetable_object_type) < 0) + if (gdbpy_type_ready (&linetable_object_type) < 0) return -1; - if (PyType_Ready (&linetable_entry_object_type) < 0) + if (gdbpy_type_ready (&linetable_entry_object_type) < 0) return -1; - if (PyType_Ready (<py_iterator_object_type) < 0) - return -1; - - Py_INCREF (&linetable_object_type); - Py_INCREF (&linetable_entry_object_type); - Py_INCREF (<py_iterator_object_type); - - if (gdb_pymodule_addobject (gdb_module, "LineTable", - (PyObject *) &linetable_object_type) < 0) - return -1; - - if (gdb_pymodule_addobject (gdb_module, "LineTableEntry", - (PyObject *) &linetable_entry_object_type) < 0) - return -1; - - if (gdb_pymodule_addobject (gdb_module, "LineTableIterator", - (PyObject *) <py_iterator_object_type) < 0) + if (gdbpy_type_ready (<py_iterator_object_type) < 0) return -1; return 0; |