Change pspace_to_pspace_object to return a new reference
This changes pspace_to_pspace_object to return a new reference and fixes up all the callers. gdb/ChangeLog 2018-09-16 Tom Tromey <tom@tromey.com> * python/py-inferior.c (infpy_get_progspace): Update. * python/python-internal.h (pspace_to_pspace_object): Change return type. * python/py-newobjfileevent.c (create_clear_objfiles_event_object): Update. * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): Update. * python/python.c (gdbpy_get_current_progspace): Update. (gdbpy_progspaces): Update. * python/py-progspace.c (pspace_to_pspace_object): Return a new reference. * python/py-objfile.c (objfpy_get_progspace): Update. * python/py-prettyprint.c (find_pretty_printer_from_progspace): Update.
This commit is contained in:
parent
8743a9cdd2
commit
3c7aa30778
9 changed files with 47 additions and 39 deletions
|
@ -128,11 +128,11 @@ find_pretty_printer_from_objfiles (PyObject *value)
|
|||
static PyObject *
|
||||
find_pretty_printer_from_progspace (PyObject *value)
|
||||
{
|
||||
PyObject *obj = pspace_to_pspace_object (current_program_space);
|
||||
gdbpy_ref<> obj = pspace_to_pspace_object (current_program_space);
|
||||
|
||||
if (!obj)
|
||||
if (obj == NULL)
|
||||
return NULL;
|
||||
gdbpy_ref<> pp_list (pspy_get_printers (obj, NULL));
|
||||
gdbpy_ref<> pp_list (pspy_get_printers (obj.get (), NULL));
|
||||
return search_pp_list (pp_list.get (), value);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue