[gegl] gegl:gegl use per op user_data for caching info
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] gegl:gegl use per op user_data for caching info
- Date: Sat, 16 Apr 2016 00:52:31 +0000 (UTC)
commit 41b9cd42ecbeddcce0cb79ab8063424268e8e280
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Apr 16 01:52:12 2016 +0100
gegl:gegl use per op user_data for caching info
operations/common/gegl.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/operations/common/gegl.c b/operations/common/gegl.c
index 4532d5e..743c58c 100644
--- a/operations/common/gegl.c
+++ b/operations/common/gegl.c
@@ -35,6 +35,8 @@ property_string (error, _("error"), "")
#include "gegl-op.h"
+/* XXX: leaking o->user_data */
+
static void
attach (GeglOperation *operation)
{
@@ -61,11 +63,11 @@ prepare (GeglOperation *operation)
gegl = operation->node;
- if (!cached || !g_str_equal (cached, o->string))
+ if (!o->user_data || !g_str_equal (cached, o->user_data))
{
- if (cached)
- g_free (cached);
- cached = g_strdup (o->string);
+ if (o->user_data)
+ g_free (o->user_data);
+ o->user_data = g_strdup (o->string);
input = gegl_node_get_input_proxy (gegl, "input");
output = gegl_node_get_output_proxy (gegl, "output");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]