From 60ee72f6d3bf10b4bd3ef1315c72c4551c459224 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Fri, 11 Dec 2020 09:33:36 -0700 Subject: Change varobj_iter::next to return unique_ptr This changes varobj_iter::next to return a unique_ptr. This fits in with the ongoing theme of trying to express these ownership transfers via the type system. gdb/ChangeLog 2020-12-11 Tom Tromey * varobj.c (update_dynamic_varobj_children): Update. * varobj-iter.h (struct varobj_iter) : Change return type. * python/py-varobj.c (struct py_varobj_iter) : Change return type. (py_varobj_iter::next): Likewise. --- gdb/varobj-iter.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gdb/varobj-iter.h') diff --git a/gdb/varobj-iter.h b/gdb/varobj-iter.h index ed65419..a05f1cb 100644 --- a/gdb/varobj-iter.h +++ b/gdb/varobj-iter.h @@ -36,7 +36,7 @@ public: virtual ~varobj_iter () = default; - virtual varobj_item *next () = 0; + virtual std::unique_ptr next () = 0; }; #endif /* VAROBJ_ITER_H */ -- cgit v1.1