diff options
author | Simon McVittie <smcv@collabora.com> | 2022-07-27 15:43:15 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2022-08-19 10:55:12 +0100 |
commit | b5658723ffafa74f5feee7f3939ec652e9020c8a (patch) | |
tree | 01e9d4329159d0a8511dac3b90e0304268a557f6 | |
parent | fabcdb3bd8c07fff03bc325a140df358c307855b (diff) | |
download | libglnx-b5658723ffafa74f5feee7f3939ec652e9020c8a.tar.gz |
backports: Backport G_OPTION_FLAG_NONE, G_OPTION_ENTRY_NULL
These make tables of options a bit clearer to write.
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rw-r--r-- | glnx-backports.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/glnx-backports.h b/glnx-backports.h index 3de9370..fd769ef 100644 --- a/glnx-backports.h +++ b/glnx-backports.h @@ -68,6 +68,14 @@ gboolean glnx_set_object (GObject **object_ptr, #define G_SPAWN_DEFAULT ((GSpawnFlags) 0) #endif +#if !GLIB_CHECK_VERSION(2, 42, 0) +#define G_OPTION_FLAG_NONE ((GOptionFlags) 0) +#endif + +#if !GLIB_CHECK_VERSION(2, 70, 0) +#define G_OPTION_ENTRY_NULL { NULL, 0, 0, 0, NULL, NULL, NULL } +#endif + #ifndef g_assert_nonnull #define g_assert_nonnull(x) g_assert (x != NULL) #endif |