Change varobj_dynamic::child_iter to unique_ptr
authorTom Tromey <tom@tromey.com>
Fri, 11 Dec 2020 16:33:36 +0000 (09:33 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 11 Dec 2020 16:33:40 +0000 (09:33 -0700)
commit24fd95b4cd40f0108299c02f31f2d2a129f83769
tree6ec333c8b503bf0d1977889bcebba980dd1b24c9
parent7446266408f6c8cdf890c23c391c0c803c7077ca
Change varobj_dynamic::child_iter to unique_ptr

This changes varobj_dynamic::child_iter to be a unique_ptr, removing
some manual management.

gdb/ChangeLog
2020-12-11  Tom Tromey  <tom@tromey.com>

* varobj.c (struct varobj_dynamic) <child_iter>: Now unique_ptr.
(varobj_get_iterator): Return unique_ptr.
(update_dynamic_varobj_children, install_visualizer)
(varobj::~varobj): Update.
* python/python-internal.h (py_varobj_get_iterator): Return
unique_ptr.
* python/py-varobj.c (py_varobj_get_iterator): Return unique_ptr.
gdb/ChangeLog
gdb/python/py-varobj.c
gdb/python/python-internal.h
gdb/varobj.c