From 7ebaa5f7821682c40e79ee1fdfe43528b7d87376 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 26 Aug 2021 18:17:40 -0600 Subject: Move value_true to value.h I noticed that value_true is declared in language.h and defined in language.c. However, as part of the value API, I think it would be better in one of those files. And, because it is very short, I changed it to be an inline function in value.h. I've also removed a comment from the implementation, on the basis that it seems obsolete -- if the change it suggests was needed, it probably would have been done by now; and if it is needed in the future, odds are it would be done differently anyway. Finally, this patch also changes value_true and value_logical_not to return a bool, and updates some uses. --- gdb/cli/cli-script.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gdb/cli/cli-script.c') diff --git a/gdb/cli/cli-script.c b/gdb/cli/cli-script.c index 9846367..0aaa59e 100644 --- a/gdb/cli/cli-script.c +++ b/gdb/cli/cli-script.c @@ -19,7 +19,6 @@ #include "defs.h" #include "value.h" -#include "language.h" /* For value_true */ #include #include "ui-out.h" @@ -579,7 +578,7 @@ execute_control_command_1 (struct command_line *cmd, int from_tty) /* Keep iterating so long as the expression is true. */ while (loop == 1) { - int cond_result; + bool cond_result; QUIT; -- cgit v1.1