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:38 -0700 |
commit | 54746ce37a483e235ac128b6f545be9888bf3521 (patch) | |
tree | 00098f97c2514f9895f1e7bab52678ed4dba9dee /include/gdb | |
parent | d8f168ddd08f1d5fde1a193724cdc40d524039a7 (diff) | |
download | gdb-54746ce37a483e235ac128b6f545be9888bf3521.zip gdb-54746ce37a483e235ac128b6f545be9888bf3521.tar.gz gdb-54746ce37a483e235ac128b6f545be9888bf3521.tar.bz2 |
C++-ify varobj iteration
This changes the varobj iteration code to use a C++ class rather than
a C struct with a separate "ops" structure. The only implementation
is updated to use inheritance. This simplifies the code quite nicely.
gdb/ChangeLog
2020-12-11 Tom Tromey <tom@tromey.com>
* varobj.c (update_dynamic_varobj_children, install_visualizer)
(varobj::~varobj): Update.
* varobj-iter.h (struct varobj_iter): Change to interface class.
(struct varobj_iter_ops): Remove.
(varobj_iter_next, varobj_iter_delete): Remove.
* python/py-varobj.c (struct py_varobj_iter): Derive from
varobj_iter. Add constructor, destructor. Rename members.
(py_varobj_iter::~py_varobj_iter): Rename from
py_varobj_iter_dtor.
(py_varobj_iter::next): Rename from py_varobj_iter_next.
(py_varobj_iter_ops): Remove.
(py_varobj_iter): Rename from py_varobj_iter_ctor.
(py_varobj_iter_new): Remove.
(py_varobj_get_iterator): Update.
Diffstat (limited to 'include/gdb')
0 files changed, 0 insertions, 0 deletions