aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-cmd.c')
-rw-r--r--gdb/python/py-cmd.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c
index 22eff25..8b6252e 100644
--- a/gdb/python/py-cmd.c
+++ b/gdb/python/py-cmd.c
@@ -600,9 +600,8 @@ gdbpy_initialize_commands (void)
return -1;
}
- Py_INCREF (&cmdpy_object_type);
- if (PyModule_AddObject (gdb_module, "Command",
- (PyObject *) &cmdpy_object_type) < 0)
+ if (gdb_pymodule_addobject (gdb_module, "Command",
+ (PyObject *) &cmdpy_object_type) < 0)
return -1;
invoke_cst = PyString_FromString ("invoke");