diff options
author | Tom Tromey <tromey@adacore.com> | 2024-06-11 14:10:08 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-06-13 10:13:36 -0600 |
commit | 7c03e522d4e059a7c59533e4b01771a7cc4bb68e (patch) | |
tree | dd852f7f61ce526ff61b5eb98977d73463703a9f /gdb/python/py-finishbreakpoint.c | |
parent | 54904469f71c06102e15707c2cb4964e496a8ed6 (diff) | |
download | binutils-7c03e522d4e059a7c59533e4b01771a7cc4bb68e.zip binutils-7c03e522d4e059a7c59533e4b01771a7cc4bb68e.tar.gz binutils-7c03e522d4e059a7c59533e4b01771a7cc4bb68e.tar.bz2 |
Return gdbpy_ref<> from gdbpy_call_method
This changes gdbpy_call_method to return a gdbpy_ref<>. This is
slightly safer because it makes it simpler to correctly handle
reference counts.
Reviewed-By: Tom de Vries <tdevries@suse.de>
Diffstat (limited to 'gdb/python/py-finishbreakpoint.c')
-rw-r--r-- | gdb/python/py-finishbreakpoint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-finishbreakpoint.c b/gdb/python/py-finishbreakpoint.c index 1b620e6..78030be 100644 --- a/gdb/python/py-finishbreakpoint.c +++ b/gdb/python/py-finishbreakpoint.c @@ -344,7 +344,7 @@ bpfinishpy_out_of_scope (struct finish_breakpoint_object *bpfinish_obj) if (bpfinish_obj->py_bp.bp->enable_state == bp_enabled && PyObject_HasAttrString (py_obj, outofscope_func)) { - gdbpy_ref<> meth_result (gdbpy_call_method (py_obj, outofscope_func)); + gdbpy_ref<> meth_result = gdbpy_call_method (py_obj, outofscope_func); if (meth_result == NULL) gdbpy_print_stack (); } |