aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-disasm.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2026-02-20 13:20:56 -0700
committerTom Tromey <tromey@adacore.com>2026-02-23 05:29:12 -0700
commita93acde059bbdfc038fff232c834a58b3835bdcf (patch)
tree3302825f30036f98b533856d166228cc6d298546 /gdb/python/py-disasm.c
parent472748485eb75a4a5744b6829e47848cba58ef59 (diff)
downloadbinutils-a93acde059bbdfc038fff232c834a58b3835bdcf.tar.gz
binutils-a93acde059bbdfc038fff232c834a58b3835bdcf.tar.bz2
binutils-a93acde059bbdfc038fff232c834a58b3835bdcf.zip
Return gdbpy_ref<> from gdbarch_to_arch_object
This changes gdbarch_to_arch_object to return a gdbpy_ref<>, using the type system to convey that a new reference is always returned. Approved-By: Simon Marchi <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/python/py-disasm.c')
-rw-r--r--gdb/python/py-disasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/python/py-disasm.c b/gdb/python/py-disasm.c
index 9f5d0e2fdcb..748ffd5e6a3 100644
--- a/gdb/python/py-disasm.c
+++ b/gdb/python/py-disasm.c
@@ -699,7 +699,7 @@ disasmpy_info_architecture (PyObject *self, void *closure)
{
disasm_info_object *obj = (disasm_info_object *) self;
DISASMPY_DISASM_INFO_REQUIRE_VALID (obj);
- return gdbarch_to_arch_object (obj->gdbarch);
+ return gdbarch_to_arch_object (obj->gdbarch).release ();
}
/* Implement DisassembleInfo.progspace attribute. Return the