From a93acde059bbdfc038fff232c834a58b3835bdcf Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 20 Feb 2026 13:20:56 -0700 Subject: 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 --- gdb/python/python-internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/python-internal.h') diff --git a/gdb/python/python-internal.h b/gdb/python/python-internal.h index 85f7f1f..1f0964f 100644 --- a/gdb/python/python-internal.h +++ b/gdb/python/python-internal.h @@ -517,7 +517,7 @@ PyObject *objfpy_get_frame_unwinders (PyObject *, void *); PyObject *objfpy_get_xmethods (PyObject *, void *); PyObject *gdbpy_lookup_objfile (PyObject *self, PyObject *args, PyObject *kw); -PyObject *gdbarch_to_arch_object (struct gdbarch *gdbarch); +gdbpy_ref<> gdbarch_to_arch_object (struct gdbarch *gdbarch); PyObject *gdbpy_all_architecture_names (PyObject *self, PyObject *args); PyObject *gdbpy_new_register_descriptor_iterator (struct gdbarch *gdbarch, -- cgit v1.1