From 8b1e8ecb54f80a760bdc694f7494fed4c0bc2675 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Wed, 13 Jul 2022 15:58:24 +0100 Subject: [PATCH] goption: Slightly improve the documentation for G_OPTION_FLAG_REVERSE None of the documentation actually mentioned booleans, which would be a useful keyword to include for context. Inspired by https://stackoverflow.com/questions/72958500/what-is-the-sense-of-a-command-line-option Signed-off-by: Philip Withnall --- glib/goption.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/glib/goption.h b/glib/goption.h index 3d525a548..6d7de3ae5 100644 --- a/glib/goption.h +++ b/glib/goption.h @@ -60,7 +60,8 @@ typedef struct _GOptionEntry GOptionEntry; * @G_OPTION_FLAG_IN_MAIN: The option appears in the main section of the * `--help` output, even if it is defined in a group. * @G_OPTION_FLAG_REVERSE: For options of the %G_OPTION_ARG_NONE kind, this - * flag indicates that the sense of the option is reversed. + * flag indicates that the sense of the option is reversed. i.e. %FALSE will + * be stored into the argument rather than %TRUE. * @G_OPTION_FLAG_NO_ARG: For options of the %G_OPTION_ARG_CALLBACK kind, * this flag indicates that the callback does not take any argument * (like a %G_OPTION_ARG_NONE option). Since 2.8 @@ -94,7 +95,7 @@ typedef enum /** * GOptionArg: - * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags. + * @G_OPTION_ARG_NONE: No extra argument. This is useful for simple flags or booleans. * @G_OPTION_ARG_STRING: The option takes a UTF-8 string argument. * @G_OPTION_ARG_INT: The option takes an integer argument. * @G_OPTION_ARG_CALLBACK: The option provides a callback (of type