Remove cleanups from prepare_execute_command

This changes prepare_execute_command to return a scoped_value_mark
rather than a cleanup.

ChangeLog
2017-10-19  Tom Tromey  <tom@tromey.com>

	* mi/mi-main.c (mi_cmd_execute): Update.
	* top.h (prepare_execute_command): Return scoped_value_mark.
	* value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
	Add move constructor.
	* top.c (prepare_execute_command): Return scoped_value_mark.
	(execute_command): Update.
This commit is contained in:
Tom Tromey
2017-10-16 17:26:09 -06:00
parent 49a4ce2eae
commit 54f70bc145
5 changed files with 21 additions and 18 deletions

View File

@@ -730,6 +730,10 @@ class scoped_value_mark
free_to_mark ();
}
scoped_value_mark (scoped_value_mark &&other) = default;
DISABLE_COPY_AND_ASSIGN (scoped_value_mark);
/* Free the values currently on the value stack. */
void free_to_mark ()
{