Replace interp_set_temp with scoped_restore_interp
authorTom Tromey <tom@tromey.com>
Sun, 13 Aug 2017 20:40:46 +0000 (14:40 -0600)
committerTom Tromey <tom@tromey.com>
Mon, 11 Sep 2017 22:15:08 +0000 (16:15 -0600)
commitbe0d7abb5e3b0be4cb928845e70a9134f1b19700
tree0452caa65b7bef568c9f1c9667f97d2db5e8ba76
parent00f675ff65ff6f78712a46e9699856e935d86d86
Replace interp_set_temp with scoped_restore_interp

This removes interp_set_temp and an associated cleanup, in favor of a
new RAII class, scoped_restore_interp.

ChangeLog
2017-09-11  Tom Tromey  <tom@tromey.com>

* cli/cli-script.c (restore_interp): Remove.
(read_command_lines): Use scoped_restore_interp.
* interps.c (scoped_restore_interp::set_temp): Rename from
interp_set_temp.
* interps.h (class scoped_restore_interp): New.
(interp_set_temp): Remove.
gdb/ChangeLog
gdb/cli/cli-script.c
gdb/interps.c
gdb/interps.h