diff options
author | Tom Tromey <tom@tromey.com> | 2020-12-11 09:33:36 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-12-11 09:33:39 -0700 |
commit | 60ee72f6d3bf10b4bd3ef1315c72c4551c459224 (patch) | |
tree | ecabe94538b876c29844cd4bd542030b6bcefb96 /gdb/varobj-iter.h | |
parent | 54746ce37a483e235ac128b6f545be9888bf3521 (diff) | |
download | fsf-binutils-gdb-60ee72f6d3bf10b4bd3ef1315c72c4551c459224.zip fsf-binutils-gdb-60ee72f6d3bf10b4bd3ef1315c72c4551c459224.tar.gz fsf-binutils-gdb-60ee72f6d3bf10b4bd3ef1315c72c4551c459224.tar.bz2 |
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 <tom@tromey.com>
* varobj.c (update_dynamic_varobj_children): Update.
* varobj-iter.h (struct varobj_iter) <next>: Change return type.
* python/py-varobj.c (struct py_varobj_iter) <next>: Change return
type.
(py_varobj_iter::next): Likewise.
Diffstat (limited to 'gdb/varobj-iter.h')
-rw-r--r-- | gdb/varobj-iter.h | 2 |
1 files changed, 1 insertions, 1 deletions
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<varobj_item> next () = 0; }; #endif /* VAROBJ_ITER_H */ |