[libglnx/wip/smcv/easy-constants: 2/2] backports: Backport G_OPTION_FLAG_NONE, G_OPTION_ENTRY_NULL
- From: Simon McVittie <smcv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libglnx/wip/smcv/easy-constants: 2/2] backports: Backport G_OPTION_FLAG_NONE, G_OPTION_ENTRY_NULL
- Date: Wed, 27 Jul 2022 14:43:41 +0000 (UTC)
commit 1e9a2ea0cfbb2d6f86207cfc668706ee0f643324
Author: Simon McVittie <smcv collabora com>
Date: Wed Jul 27 15:43:15 2022 +0100
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>
glnx-backports.h | 8 ++++++++
1 file changed, 8 insertions(+)
---
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]