summaryrefslogtreecommitdiff
path: root/gdb/python/py-xmethods.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/python/py-xmethods.c')
-rw-r--r--gdb/python/py-xmethods.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c
index f7e3c37210c..c568295a165 100644
--- a/gdb/python/py-xmethods.c
+++ b/gdb/python/py-xmethods.c
@@ -122,7 +122,6 @@ gdbpy_get_matching_xmethod_workers
std::vector<xmethod_worker_up> *dm_vec)
{
struct objfile *objfile;
- PyObject *py_progspace;
gdb_assert (obj_type != NULL && method_name != NULL);
@@ -170,10 +169,11 @@ gdbpy_get_matching_xmethod_workers
/* Gather debug methods matchers registered with the current program
space. */
- py_progspace = pspace_to_pspace_object (current_program_space);
+ gdbpy_ref<> py_progspace = pspace_to_pspace_object (current_program_space);
if (py_progspace != NULL)
{
- gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace, NULL));
+ gdbpy_ref<> pspace_matchers (pspy_get_xmethods (py_progspace.get (),
+ NULL));
gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (),
pspace_matchers.get ()));