mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-05-24 10:46:24 +08:00
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:
@ -166,12 +166,7 @@ objfpy_get_progspace (PyObject *self, void *closure)
|
||||
objfile_object *obj = (objfile_object *) self;
|
||||
|
||||
if (obj->objfile)
|
||||
{
|
||||
PyObject *pspace = pspace_to_pspace_object (obj->objfile->pspace);
|
||||
|
||||
Py_XINCREF (pspace);
|
||||
return pspace;
|
||||
}
|
||||
return pspace_to_pspace_object (obj->objfile->pspace).release ();
|
||||
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user