From 3c7aa30778a1615d88c13508c04138ef2499112d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 12 Sep 2018 21:44:19 -0600 Subject: 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 * 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. --- gdb/python/python-internal.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/python/python-internal.h') diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 1c526af..58baa11 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -516,8 +516,7 @@ PyObject *value_to_value_object (struct value *v); PyObject *type_to_type_object (struct type *); PyObject *frame_info_to_frame_object (struct frame_info *frame); PyObject *symtab_to_linetable_object (PyObject *symtab); -PyObject *pspace_to_pspace_object (struct program_space *) - CPYCHECKER_RETURNS_BORROWED_REF; +gdbpy_ref<> pspace_to_pspace_object (struct program_space *); PyObject *pspy_get_printers (PyObject *, void *); PyObject *pspy_get_frame_filters (PyObject *, void *); PyObject *pspy_get_frame_unwinders (PyObject *, void *); -- cgit v1.1