diff options
Diffstat (limited to 'gdb/python/py-cmd.c')
-rw-r--r-- | gdb/python/py-cmd.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/gdb/python/py-cmd.c b/gdb/python/py-cmd.c index cd2a9bb..3aaf7f9 100644 --- a/gdb/python/py-cmd.c +++ b/gdb/python/py-cmd.c @@ -95,14 +95,11 @@ cmdpy_dont_repeat (PyObject *self, PyObject *args) static void cmdpy_destroyer (struct cmd_list_element *self, void *context) { - cmdpy_object *cmd; - gdbpy_enter enter_py (get_current_arch (), current_language); /* Release our hold on the command object. */ - cmd = (cmdpy_object *) context; + gdbpy_ref<cmdpy_object> cmd ((cmdpy_object *) context); cmd->command = NULL; - Py_DECREF (cmd); /* We allocated the name, doc string, and perhaps the prefix name. */ |