From fb81682fec66f22347282d78370f0903ec5ead53 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 20 Feb 2026 13:05:24 -0700 Subject: Return gdbpy_ref<> from type_to_type_object This changes type_to_type_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.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/python/python.c') diff --git a/gdb/python/python.c b/gdb/python/python.c index aec2c75..9862d1a 100644 --- a/gdb/python/python.c +++ b/gdb/python/python.c @@ -2105,7 +2105,7 @@ gdbpy_apply_type_printers (const struct extension_language_defn *extlang, gdbpy_enter enter_py; - gdbpy_ref<> type_obj (type_to_type_object (type)); + gdbpy_ref<> type_obj = type_to_type_object (type); if (type_obj == NULL) { gdbpy_print_stack (); -- cgit v1.1