Remove make_cleanup_restore_current_uiout

This removes make_cleanup_restore_current_uiout in favor of an
RAII-based class.

2016-10-21  Tom Tromey  <tom@tromey.com>

	* stack.c (print_stack_frame_to_uiout): Use scoped_restore.
	* ui-out.c (make_cleanup_restore_current_uiout)
	(restore_current_uiout_cleanup): Remove.
	* infrun.c (print_stop_event): Use scoped_restore.
	* ui-out.h (make_cleanup_restore_current_uiout): Don't declare.
This commit is contained in:
Tom Tromey 2016-09-24 21:53:54 -06:00
parent d1e4a62469
commit 67ad9399e2
6 changed files with 16 additions and 38 deletions

View file

@ -648,7 +648,7 @@ execute_gdb_command (PyObject *self, PyObject *args, PyObject *kw)
scoped_restore save_async = make_scoped_restore (&current_ui->async, 0);
make_cleanup_restore_current_uiout ();
scoped_restore save_uiout = make_scoped_restore (&current_uiout);
/* Use the console interpreter uiout to have the same print format
for console or MI. */