summaryrefslogtreecommitdiff
path: root/libgjs-private
diff options
context:
space:
mode:
authorPhilip Chimento <philip.chimento@gmail.com>2022-11-01 22:20:37 -0700
committerPhilip Chimento <philip.chimento@gmail.com>2022-11-01 22:20:37 -0700
commitda02ead80bc392521fc3ac1ab46c18ba7050212b (patch)
treedfcccd5c367df9fc80a847c60a3c950b266af536 /libgjs-private
parent9806c5e631ca06fff4b972ddddf7eef170893d8d (diff)
downloadgjs-da02ead80bc392521fc3ac1ab46c18ba7050212b.tar.gz
GObject: Handle versions of GLib without GBindingGroup
We don't require GLib 2.72 for anything else, so it makes sense to conditionally define the override for GObject.BindingGroup.bind_full(). If GLib is too old then the override (and its tests) are skipped.
Diffstat (limited to 'libgjs-private')
-rw-r--r--libgjs-private/gjs-util.c2
-rw-r--r--libgjs-private/gjs-util.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/libgjs-private/gjs-util.c b/libgjs-private/gjs-util.c
index 6e9ffec2..b264aec1 100644
--- a/libgjs-private/gjs-util.c
+++ b/libgjs-private/gjs-util.c
@@ -125,6 +125,7 @@ GBinding* gjs_g_object_bind_property_full(
to_closure, from_closure);
}
+#if GLIB_CHECK_VERSION(2, 72, 0)
void gjs_g_binding_group_bind_full(
GBindingGroup* source, const char* source_property, GObject* target,
const char* target_property, GBindingFlags flags,
@@ -146,6 +147,7 @@ void gjs_g_binding_group_bind_full(
target_property, flags,
to_closure, from_closure);
}
+#endif
#undef G_CLOSURE_NOTIFY
diff --git a/libgjs-private/gjs-util.h b/libgjs-private/gjs-util.h
index f67d1db6..7ee83e0d 100644
--- a/libgjs-private/gjs-util.h
+++ b/libgjs-private/gjs-util.h
@@ -141,6 +141,7 @@ GBinding* gjs_g_object_bind_property_full(
GDestroyNotify to_notify, GjsBindingTransformFunc from_callback,
void* from_data, GDestroyNotify from_notify);
+#if GLIB_CHECK_VERSION(2, 72, 0)
/**
* gjs_g_binding_group_bind_full:
* @source:
@@ -162,6 +163,7 @@ void gjs_g_binding_group_bind_full(
GjsBindingTransformFunc to_callback, void* to_data,
GDestroyNotify to_notify, GjsBindingTransformFunc from_callback,
void* from_data, GDestroyNotify from_notify);
+#endif
/* For imports.overrides.Gtk */
GJS_EXPORT