[gegl] Use set_qdata for gegl_object_set_has_forked
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Use set_qdata for gegl_object_set_has_forked
- Date: Thu, 12 Dec 2013 04:13:29 +0000 (UTC)
commit fdf2e3d15687f2d8f16f386d6d1fcb0fb9e02d66
Author: Daniel Sabo <DanielSabo gmail com>
Date: Fri Dec 6 23:33:32 2013 -0800
Use set_qdata for gegl_object_set_has_forked
gegl/operation/gegl-operations.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/gegl/operation/gegl-operations.c b/gegl/operation/gegl-operations.c
index 9490185..f1f7c56 100644
--- a/gegl/operation/gegl-operations.c
+++ b/gegl/operation/gegl-operations.c
@@ -191,15 +191,26 @@ gboolean gegl_can_do_inplace_processing (GeglOperation *operation,
return FALSE;
}
+static GQuark
+gegl_has_forked_quark (void)
+{
+ static GQuark the_quark = 0;
+
+ if (G_UNLIKELY (the_quark == 0))
+ the_quark = g_quark_from_static_string ("gegl-object-has-forked");
+
+ return the_quark;
+}
+
void
gegl_object_set_has_forked (GObject *object)
{
- g_object_set_data (object, "gegl has-forked", (void*)0xf);
+ g_object_set_qdata (object, gegl_has_forked_quark (), (void*)0xf);
}
gboolean
gegl_object_get_has_forked (GObject *object)
{
- return g_object_get_data(object, "gegl has-forked") != NULL;
+ return g_object_get_qdata (object, gegl_has_forked_quark ()) != NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]