[libglnx/wip/smcv/2-74-constants: 10/10] backports: Backport new NONE/DEFAULT constants from GLib 2.74




commit 5bb5b7c71ed917e55aea06171af7fb1b95dae817
Author: Simon McVittie <smcv collabora com>
Date:   Mon Oct 10 14:38:25 2022 +0100

    backports: Backport new NONE/DEFAULT constants from GLib 2.74
    
    These enums were not originally defined with a zero-valued constant
    (or in the case of GApplicationFlags, the constant always existed but
    its name was inappropriate for GObject-Introspection), and the
    corresponding constants were added in GLib 2.74 to make them more
    self-documenting.
    
    Signed-off-by: Simon McVittie <smcv collabora com>

 glnx-backports.h | 13 +++++++++++++
 1 file changed, 13 insertions(+)
---
diff --git a/glnx-backports.h b/glnx-backports.h
index 68ce025..184a6d1 100644
--- a/glnx-backports.h
+++ b/glnx-backports.h
@@ -94,4 +94,17 @@ gboolean              glnx_set_object  (GObject **object_ptr,
   (((a) > (b) ? (a) - (b) : (b) - (a)) < (epsilon))
 #endif
 
+#if !GLIB_CHECK_VERSION(2, 74, 0)
+#define G_APPLICATION_DEFAULT_FLAGS ((GApplicationFlags) 0)
+#define G_CONNECT_DEFAULT ((GConnectFlags) 0)
+#define G_IO_FLAG_NONE ((GIOFlags) 0)
+#define G_MARKUP_DEFAULT_FLAGS ((GMarkupParseFlags) 0)
+#define G_REGEX_DEFAULT ((GRegexCompileFlags) 0)
+#define G_REGEX_MATCH_DEFAULT ((GRegexMatchFlags) 0)
+#define G_TEST_SUBPROCESS_DEFAULT ((GTestSubprocessFlags) 0)
+#define G_TEST_TRAP_DEFAULT ((GTestTrapFlags) 0)
+#define G_TLS_CERTIFICATE_NO_FLAGS ((GTlsCertificateFlags) 0)
+#define G_TYPE_FLAG_NONE ((GTypeFlags) 0)
+#endif
+
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]