Introduce enum_flag type for ui_out flags

This patch changes the ui_out flags to be an enum flag.

gdb/ChangeLog:

	* ui-out.h: Include "common/enum-flags.h".
	(enum ui_flags): Rename to ...
	(enum ui_out_flag): ... this.
	(ui_out_flags): Define enum flag type.
	(ui_out_test_flags): Change type of parameter to ui_out_flags.
	(ui_out_new): Likewise.
	* ui-out.c (ui_out_test_flags): Likewise.
	(ui_out_new): Likewise.
	* cli-out.c (cli_out_new): Update variable type.
	* mi/mi-out.c (mi_out_new): Likewise.
	* tui/tui-out.c (tui_out_new): Likewise.
This commit is contained in:
Simon Marchi
2016-12-02 17:12:37 -05:00
committed by Simon Marchi
parent 107c2d628b
commit bef721e278
6 changed files with 27 additions and 12 deletions

View File

@@ -702,7 +702,7 @@ ui_out_redirect (struct ui_out *uiout, struct ui_file *outstream)
/* Test the flags against the mask given. */
int
ui_out_test_flags (struct ui_out *uiout, int mask)
ui_out_test_flags (struct ui_out *uiout, ui_out_flags mask)
{
return (uiout->flags & mask);
}
@@ -923,7 +923,7 @@ ui_out_query_field (struct ui_out *uiout, int colno,
struct ui_out *
ui_out_new (const struct ui_out_impl *impl, void *data,
int flags)
ui_out_flags flags)
{
struct ui_out *uiout = new ui_out ();