From f772ad29ab606742aa00db2de62e8983b5ebce0a Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 7 Oct 2025 15:02:57 -0400 Subject: gdb: change objfiles_iterator to yield references Same rationale as the previous patches. Change-Id: I4673cedaa902c9a327d24d73508b18cf60a2cd02 Approved-By: Tom Tromey --- gdb/python/py-progspace.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gdb/python/py-progspace.c') diff --git a/gdb/python/py-progspace.c b/gdb/python/py-progspace.c index 61f9b4b..9f3e45c 100644 --- a/gdb/python/py-progspace.c +++ b/gdb/python/py-progspace.c @@ -431,9 +431,9 @@ pspy_get_objfiles (PyObject *self_, PyObject *args) if (self->pspace != NULL) { - for (objfile *objf : self->pspace->objfiles ()) + for (objfile &objf : self->pspace->objfiles ()) { - gdbpy_ref<> item = objfile_to_objfile_object (objf); + gdbpy_ref<> item = objfile_to_objfile_object (&objf); if (item == nullptr || PyList_Append (list.get (), item.get ()) == -1) -- cgit v1.1