forked from Imagelibrary/binutils-gdb
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:
18
gdb/ui-out.c
18
gdb/ui-out.c
@@ -952,24 +952,6 @@ ui_out_destroy (struct ui_out *uiout)
|
||||
xfree (uiout);
|
||||
}
|
||||
|
||||
/* Cleanup that restores a previous current uiout. */
|
||||
|
||||
static void
|
||||
restore_current_uiout_cleanup (void *arg)
|
||||
{
|
||||
struct ui_out *saved_uiout = (struct ui_out *) arg;
|
||||
|
||||
current_uiout = saved_uiout;
|
||||
}
|
||||
|
||||
/* See ui-out.h. */
|
||||
|
||||
struct cleanup *
|
||||
make_cleanup_restore_current_uiout (void)
|
||||
{
|
||||
return make_cleanup (restore_current_uiout_cleanup, current_uiout);
|
||||
}
|
||||
|
||||
/* Standard gdb initialization hook. */
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user