[glib/wip/smcv/none-flags: 3/3] glib: Consistently have a NONE or DEFAULT member in flags sets
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/wip/smcv/none-flags: 3/3] glib: Consistently have a NONE or DEFAULT member in flags sets
- Date: Thu, 31 Mar 2022 13:31:23 +0000 (UTC)
commit 0f64805c3da6f36cbf066176638d5b8f215c30bd
Author: Simon McVittie <smcv collabora com>
Date: Thu Mar 31 14:30:43 2022 +0100
glib: Consistently have a NONE or DEFAULT member in flags sets
Signed-off-by: Simon McVittie <smcv collabora com>
glib/gfileutils.c | 2 ++
glib/gfileutils.h | 1 +
glib/ghook.c | 1 +
glib/ghook.h | 1 +
glib/giochannel.c | 3 +++
glib/giochannel.h | 1 +
glib/gmain.h | 1 +
glib/gmarkup.h | 2 ++
glib/gmessages.c | 1 +
glib/gmessages.h | 1 +
glib/gnode.c | 2 ++
glib/gnode.h | 1 +
glib/gregex.h | 4 ++++
glib/gstrfuncs.h | 1 +
glib/gtestutils.c | 1 +
glib/gtestutils.h | 3 +++
16 files changed, 26 insertions(+)
---
diff --git a/glib/gfileutils.c b/glib/gfileutils.c
index 8681b1326e..12c62c4ae1 100644
--- a/glib/gfileutils.c
+++ b/glib/gfileutils.c
@@ -188,6 +188,8 @@
/**
* GFileTest:
+ * @G_FILE_TEST_NONE: No tests (not practically useful to pass to
+ * g_file_test(), included for completeness). Since 2.74
* @G_FILE_TEST_IS_REGULAR: %TRUE if the file is a regular file
* (not a directory). Note that this test will also return %TRUE
* if the tested file is a symlink to a regular file.
diff --git a/glib/gfileutils.h b/glib/gfileutils.h
index 4c96332248..0adcfb36b8 100644
--- a/glib/gfileutils.h
+++ b/glib/gfileutils.h
@@ -65,6 +65,7 @@ typedef enum
*/
typedef enum
{
+ G_FILE_TEST_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_FILE_TEST_IS_REGULAR = 1 << 0,
G_FILE_TEST_IS_SYMLINK = 1 << 1,
G_FILE_TEST_IS_DIR = 1 << 2,
diff --git a/glib/ghook.c b/glib/ghook.c
index 00187bf79d..f56ca16ba2 100644
--- a/glib/ghook.c
+++ b/glib/ghook.c
@@ -71,6 +71,7 @@
/**
* GHookFlagMask:
+ * @G_HOOK_FLAG_NONE: No flags set. Since: 2.74
* @G_HOOK_FLAG_ACTIVE: set if the hook has not been destroyed
* @G_HOOK_FLAG_IN_CALL: set if the hook is currently being run
* @G_HOOK_FLAG_MASK: A mask covering all bits reserved for
diff --git a/glib/ghook.h b/glib/ghook.h
index 83ad1bdefc..b096a7439b 100644
--- a/glib/ghook.h
+++ b/glib/ghook.h
@@ -52,6 +52,7 @@ typedef void (*GHookFinalizeFunc) (GHookList *hook_list,
GHook *hook);
typedef enum
{
+ G_HOOK_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_HOOK_FLAG_ACTIVE = 1 << 0,
G_HOOK_FLAG_IN_CALL = 1 << 1,
G_HOOK_FLAG_MASK = 0x0f
diff --git a/glib/giochannel.c b/glib/giochannel.c
index 12ca051ad7..57ab5f0cba 100644
--- a/glib/giochannel.c
+++ b/glib/giochannel.c
@@ -688,6 +688,8 @@ g_io_add_watch_full (GIOChannel *channel,
**/
/**
* GIOCondition:
+ * @G_IO_CONDITION_NONE: No condition set (not practically useful to pass
+ * to g_io_add_watch(), included for completeness). Since: 2.74
* @G_IO_IN: There is data to read.
* @G_IO_OUT: Data can be written (without blocking).
* @G_IO_PRI: There is urgent data to read.
@@ -944,6 +946,7 @@ g_io_channel_get_line_term (GIOChannel *channel,
**/
/**
* GIOFlags:
+ * @G_IO_FLAG_NONE: no special flags set. Since: 2.74
* @G_IO_FLAG_APPEND: turns on append mode, corresponds to %O_APPEND
* (see the documentation of the UNIX open() syscall)
* @G_IO_FLAG_NONBLOCK: turns on nonblocking mode, corresponds to
diff --git a/glib/giochannel.h b/glib/giochannel.h
index 82743602a7..faea3ed19d 100644
--- a/glib/giochannel.h
+++ b/glib/giochannel.h
@@ -83,6 +83,7 @@ typedef enum
typedef enum
{
+ G_IO_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_IO_FLAG_APPEND = 1 << 0,
G_IO_FLAG_NONBLOCK = 1 << 1,
G_IO_FLAG_IS_READABLE = 1 << 2, /* Read only flag */
diff --git a/glib/gmain.h b/glib/gmain.h
index 895814a9ce..e2473f8ee7 100644
--- a/glib/gmain.h
+++ b/glib/gmain.h
@@ -30,6 +30,7 @@ G_BEGIN_DECLS
typedef enum /*< flags >*/
{
+ G_IO_CONDITION_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, /*< nick=none >*/
G_IO_IN GLIB_SYSDEF_POLLIN,
G_IO_OUT GLIB_SYSDEF_POLLOUT,
G_IO_PRI GLIB_SYSDEF_POLLPRI,
diff --git a/glib/gmarkup.h b/glib/gmarkup.h
index 96375b55a1..27747adf3b 100644
--- a/glib/gmarkup.h
+++ b/glib/gmarkup.h
@@ -74,6 +74,7 @@ GQuark g_markup_error_quark (void);
/**
* GMarkupParseFlags:
+ * @G_MARKUP_PARSE_FLAGS_NONE: No special behaviour. Since: 2.74
* @G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG: flag you should not use
* @G_MARKUP_TREAT_CDATA_AS_TEXT: When this flag is set, CDATA marked
* sections are not passed literally to the @passthrough function of
@@ -94,6 +95,7 @@ GQuark g_markup_error_quark (void);
*/
typedef enum
{
+ G_MARKUP_PARSE_FLAGS_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0, /*< nick=none >*/
G_MARKUP_DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0,
G_MARKUP_TREAT_CDATA_AS_TEXT = 1 << 1,
G_MARKUP_PREFIX_ERROR_POSITION = 1 << 2,
diff --git a/glib/gmessages.c b/glib/gmessages.c
index 008bf5c13c..00d8952ada 100644
--- a/glib/gmessages.c
+++ b/glib/gmessages.c
@@ -293,6 +293,7 @@ myInvalidParameterHandler(const wchar_t *expression,
/**
* GLogLevelFlags:
+ * @G_LOG_FLAG_NONE: no flags set. Since: 2.74
* @G_LOG_FLAG_RECURSION: internal flag
* @G_LOG_FLAG_FATAL: internal flag
* @G_LOG_LEVEL_ERROR: log level for errors, see g_error().
diff --git a/glib/gmessages.h b/glib/gmessages.h
index c7efd53765..0fd67f033c 100644
--- a/glib/gmessages.h
+++ b/glib/gmessages.h
@@ -53,6 +53,7 @@ gsize g_printf_string_upper_bound (const gchar* format,
typedef enum
{
/* log flags */
+ G_LOG_FLAG_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_LOG_FLAG_RECURSION = 1 << 0,
G_LOG_FLAG_FATAL = 1 << 1,
diff --git a/glib/gnode.c b/glib/gnode.c
index 4becb683d5..fb6fbc5dfd 100644
--- a/glib/gnode.c
+++ b/glib/gnode.c
@@ -849,6 +849,8 @@ g_node_depth_traverse_level (GNode *node,
/**
* GTraverseFlags:
+ * @G_TRAVERSE_NONE: no nodes are visited (not practically useful,
+ * included for completeness). Since 2.74
* @G_TRAVERSE_LEAVES: only leaf nodes should be visited. This name has
* been introduced in 2.6, for older version use
* %G_TRAVERSE_LEAFS.
diff --git a/glib/gnode.h b/glib/gnode.h
index 693e6154da..f3ae2f11ec 100644
--- a/glib/gnode.h
+++ b/glib/gnode.h
@@ -38,6 +38,7 @@ typedef struct _GNode GNode;
/* Tree traverse flags */
typedef enum
{
+ G_TRAVERSE_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_TRAVERSE_LEAVES = 1 << 0,
G_TRAVERSE_NON_LEAVES = 1 << 1,
G_TRAVERSE_ALL = G_TRAVERSE_LEAVES | G_TRAVERSE_NON_LEAVES,
diff --git a/glib/gregex.h b/glib/gregex.h
index b982f6931a..817f66782c 100644
--- a/glib/gregex.h
+++ b/glib/gregex.h
@@ -216,6 +216,7 @@ GQuark g_regex_error_quark (void);
/**
* GRegexCompileFlags:
+ * @G_REGEX_DEFAULT: No special options set. Since: 2.74
* @G_REGEX_CASELESS: Letters in the pattern match both upper- and
* lowercase letters. This option can be changed within a pattern
* by a "(?i)" option setting.
@@ -295,6 +296,7 @@ GQuark g_regex_error_quark (void);
*/
typedef enum
{
+ G_REGEX_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_REGEX_CASELESS = 1 << 0,
G_REGEX_MULTILINE = 1 << 1,
G_REGEX_DOTALL = 1 << 2,
@@ -317,6 +319,7 @@ typedef enum
/**
* GRegexMatchFlags:
+ * @G_REGEX_MATCH_DEFAULT: No special options set. Since: 2.74
* @G_REGEX_MATCH_ANCHORED: The pattern is forced to be "anchored", that is,
* it is constrained to match only at the first matching point in the
* string that is being searched. This effect can also be achieved by
@@ -385,6 +388,7 @@ typedef enum
* adding a new flag. */
typedef enum
{
+ G_REGEX_MATCH_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_REGEX_MATCH_ANCHORED = 1 << 4,
G_REGEX_MATCH_NOTBOL = 1 << 7,
G_REGEX_MATCH_NOTEOL = 1 << 8,
diff --git a/glib/gstrfuncs.h b/glib/gstrfuncs.h
index 2b44c9a55c..2a21dad0ae 100644
--- a/glib/gstrfuncs.h
+++ b/glib/gstrfuncs.h
@@ -38,6 +38,7 @@ G_BEGIN_DECLS
/* Functions like the ones in <ctype.h> that are not affected by locale. */
typedef enum {
+ G_ASCII_NONE GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_ASCII_ALNUM = 1 << 0,
G_ASCII_ALPHA = 1 << 1,
G_ASCII_CNTRL = 1 << 2,
diff --git a/glib/gtestutils.c b/glib/gtestutils.c
index dca4badcfc..1d1e8a133b 100644
--- a/glib/gtestutils.c
+++ b/glib/gtestutils.c
@@ -355,6 +355,7 @@
/**
* GTestSubprocessFlags:
+ * @G_TEST_SUBPROCESS_DEFAULT: Default behaviour. Since: 2.74
* @G_TEST_SUBPROCESS_INHERIT_STDIN: If this flag is given, the child
* process will inherit the parent's stdin. Otherwise, the child's
* stdin is redirected to `/dev/null`.
diff --git a/glib/gtestutils.h b/glib/gtestutils.h
index 7dee4822d3..794da05d43 100644
--- a/glib/gtestutils.h
+++ b/glib/gtestutils.h
@@ -423,6 +423,7 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
/**
* GTestTrapFlags:
+ * @G_TEST_TRAP_DEFAULT: Default behaviour. Since: 2.74
* @G_TEST_TRAP_SILENCE_STDOUT: Redirect stdout of the test child to
* `/dev/null` so it cannot be observed on the console during test
* runs. The actual output is still captured though to allow later
@@ -443,6 +444,7 @@ void g_test_queue_destroy (GDestroyNotify destroy_func,
* #GTestSubprocessFlags.
*/
typedef enum {
+ G_TEST_TRAP_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_TEST_TRAP_SILENCE_STDOUT = 1 << 7,
G_TEST_TRAP_SILENCE_STDERR = 1 << 8,
G_TEST_TRAP_INHERIT_STDIN = 1 << 9
@@ -457,6 +459,7 @@ gboolean g_test_trap_fork (guint64 usec_timeout,
G_GNUC_END_IGNORE_DEPRECATIONS
typedef enum {
+ G_TEST_SUBPROCESS_DEFAULT GLIB_AVAILABLE_ENUMERATOR_IN_2_74 = 0,
G_TEST_SUBPROCESS_INHERIT_STDIN = 1 << 0,
G_TEST_SUBPROCESS_INHERIT_STDOUT = 1 << 1,
G_TEST_SUBPROCESS_INHERIT_STDERR = 1 << 2
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]