aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-breakpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-breakpoint.c')
-rw-r--r--gdb/python/py-breakpoint.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/python/py-breakpoint.c b/gdb/python/py-breakpoint.c
index b1b6e93..d958f30 100644
--- a/gdb/python/py-breakpoint.c
+++ b/gdb/python/py-breakpoint.c
@@ -868,9 +868,8 @@ gdbpy_initialize_breakpoints (void)
if (PyType_Ready (&breakpoint_object_type) < 0)
return -1;
- Py_INCREF (&breakpoint_object_type);
- if (PyModule_AddObject (gdb_module, "Breakpoint",
- (PyObject *) &breakpoint_object_type) < 0)
+ if (gdb_pymodule_addobject (gdb_module, "Breakpoint",
+ (PyObject *) &breakpoint_object_type) < 0)
return -1;
observer_attach_breakpoint_created (gdbpy_breakpoint_created);