aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/python.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2026-02-20 13:05:24 -0700
committerTom Tromey <tromey@adacore.com>2026-02-23 05:29:12 -0700
commitfb81682fec66f22347282d78370f0903ec5ead53 (patch)
tree372c94a63cdd74cee34487a7f345b8b3d08340ea /gdb/python/python.c
parent9a1759726922190c5a921373e4db7109a638056f (diff)
downloadfsf-binutils-gdb-fb81682fec66f22347282d78370f0903ec5ead53.zip
fsf-binutils-gdb-fb81682fec66f22347282d78370f0903ec5ead53.tar.gz
fsf-binutils-gdb-fb81682fec66f22347282d78370f0903ec5ead53.tar.bz2
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 <simon.marchi@efficios.com>
Diffstat (limited to 'gdb/python/python.c')
-rw-r--r--gdb/python/python.c2
1 files changed, 1 insertions, 1 deletions
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 ();