diff options
author | Tom Tromey <tom@tromey.com> | 2018-09-12 23:06:09 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-09-16 07:25:56 -0600 |
commit | 0a9db5ad8a6c49cec7adb7e3ef29c558fcfbf11b (patch) | |
tree | 93925dced92f15d3b5e3986ba75f023896f64512 /gdb/python/py-xmethods.c | |
parent | 3c7aa30778a1615d88c13508c04138ef2499112d (diff) | |
download | binutils-0a9db5ad8a6c49cec7adb7e3ef29c558fcfbf11b.zip binutils-0a9db5ad8a6c49cec7adb7e3ef29c558fcfbf11b.tar.gz binutils-0a9db5ad8a6c49cec7adb7e3ef29c558fcfbf11b.tar.bz2 |
Change objfile_to_objfile_object to return a new reference
This changes objfile_to_objfile_object to return a new references and
fixes up all the uses.
gdb/ChangeLog
2018-09-16 Tom Tromey <tom@tromey.com>
* python/py-progspace.c (pspy_get_objfiles): Update.
* python/python-internal.h (objfile_to_objfile_object): Change
return type.
* python/py-newobjfileevent.c (create_new_objfile_event_object):
Update.
* python/py-xmethods.c (gdbpy_get_matching_xmethod_workers):
Update.
* python/python.c (gdbpy_get_current_objfile): Update.
(gdbpy_objfiles): Update.
* python/py-objfile.c (objfpy_get_owner, gdbpy_lookup_objfile):
Update.
(objfile_to_objfile_object): Return a new reference.
* python/py-symtab.c (stpy_get_objfile): Update.
* python/py-prettyprint.c (find_pretty_printer_from_objfiles):
Update.
Diffstat (limited to 'gdb/python/py-xmethods.c')
-rw-r--r-- | gdb/python/py-xmethods.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gdb/python/py-xmethods.c b/gdb/python/py-xmethods.c index c568295..8e616cd 100644 --- a/gdb/python/py-xmethods.c +++ b/gdb/python/py-xmethods.c @@ -147,7 +147,7 @@ gdbpy_get_matching_xmethod_workers list individually, but there's no data yet to show it's needed. */ ALL_OBJFILES (objfile) { - PyObject *py_objfile = objfile_to_objfile_object (objfile); + gdbpy_ref<> py_objfile = objfile_to_objfile_object (objfile); if (py_objfile == NULL) { @@ -155,7 +155,8 @@ gdbpy_get_matching_xmethod_workers return EXT_LANG_RC_ERROR; } - gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile, NULL)); + gdbpy_ref<> objfile_matchers (objfpy_get_xmethods (py_objfile.get (), + NULL)); gdbpy_ref<> temp (PySequence_Concat (py_xmethod_matcher_list.get (), objfile_matchers.get ())); if (temp == NULL) |