[gegl] operation: Add autocleanups for GeglOperation sub-classes



commit d52b0385eb0147a1b8b0b75519836f45e7da8e9e
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Mar 15 10:41:04 2017 +0100

    operation: Add autocleanups for GeglOperation sub-classes
    
    Since GeglOperation sub-classes are reference-managed by GeglNode, it
    is unlikely that applications will need to use g_autoptr with them.
    This is primarily meant to let applications use G_DECLARE_* to reduce
    the GObject boilerplate when defining their own operations. Since
    G_DECLARE_* also defines the cleanup function for the new type, it is
    necessary for the parent to also define it, even if it won't be used.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=780083

 gegl/operation/gegl-operation-area-filter.h     |    2 ++
 gegl/operation/gegl-operation-composer.h        |    2 ++
 gegl/operation/gegl-operation-composer3.h       |    2 ++
 gegl/operation/gegl-operation-filter.h          |    2 ++
 gegl/operation/gegl-operation-meta-json.h       |    2 ++
 gegl/operation/gegl-operation-meta.h            |    2 ++
 gegl/operation/gegl-operation-point-composer.h  |    2 ++
 gegl/operation/gegl-operation-point-composer3.h |    2 ++
 gegl/operation/gegl-operation-point-filter.h    |    2 ++
 gegl/operation/gegl-operation-point-render.h    |    2 ++
 gegl/operation/gegl-operation-sink.h            |    2 ++
 gegl/operation/gegl-operation-source.h          |    2 ++
 gegl/operation/gegl-operation-temporal.h        |    1 +
 13 files changed, 25 insertions(+), 0 deletions(-)
---
diff --git a/gegl/operation/gegl-operation-area-filter.h b/gegl/operation/gegl-operation-area-filter.h
index 94b14f2..789732d 100644
--- a/gegl/operation/gegl-operation-area-filter.h
+++ b/gegl/operation/gegl-operation-area-filter.h
@@ -56,6 +56,8 @@ struct _GeglOperationAreaFilterClass
 
 GType gegl_operation_area_filter_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationAreaFilter, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-composer.h b/gegl/operation/gegl-operation-composer.h
index 812d99a..0d1a420 100644
--- a/gegl/operation/gegl-operation-composer.h
+++ b/gegl/operation/gegl-operation-composer.h
@@ -57,6 +57,8 @@ struct _GeglOperationComposerClass
 
 GType gegl_operation_composer_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationComposer, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-composer3.h b/gegl/operation/gegl-operation-composer3.h
index 1ba31a0..a59ceae 100644
--- a/gegl/operation/gegl-operation-composer3.h
+++ b/gegl/operation/gegl-operation-composer3.h
@@ -53,6 +53,8 @@ struct _GeglOperationComposer3Class
 
 GType gegl_operation_composer3_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationComposer3, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-filter.h b/gegl/operation/gegl-operation-filter.h
index 52e928a..d6ed095 100644
--- a/gegl/operation/gegl-operation-filter.h
+++ b/gegl/operation/gegl-operation-filter.h
@@ -55,6 +55,8 @@ struct _GeglOperationFilterClass
 
 GType gegl_operation_filter_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationFilter, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-meta-json.h b/gegl/operation/gegl-operation-meta-json.h
index 8d73e7c..35cf234 100644
--- a/gegl/operation/gegl-operation-meta-json.h
+++ b/gegl/operation/gegl-operation-meta-json.h
@@ -51,6 +51,8 @@ struct _GeglOperationMetaJsonClass
 
 GType gegl_operation_meta_json_get_type         (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationMetaJson, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-meta.h b/gegl/operation/gegl-operation-meta.h
index b0cef20..4109330 100644
--- a/gegl/operation/gegl-operation-meta.h
+++ b/gegl/operation/gegl-operation-meta.h
@@ -70,6 +70,8 @@ void  gegl_operation_meta_property_changed (GeglOperationMeta *self,
                                             GParamSpec        *pspec,
                                             gpointer           user_data);
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationMeta, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-point-composer.h b/gegl/operation/gegl-operation-point-composer.h
index 5e5b0c2..15cac13 100644
--- a/gegl/operation/gegl-operation-point-composer.h
+++ b/gegl/operation/gegl-operation-point-composer.h
@@ -70,6 +70,8 @@ struct _GeglOperationPointComposerClass
 
 GType gegl_operation_point_composer_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationPointComposer, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-point-composer3.h b/gegl/operation/gegl-operation-point-composer3.h
index 2d6a7ad..54ecd14 100644
--- a/gegl/operation/gegl-operation-point-composer3.h
+++ b/gegl/operation/gegl-operation-point-composer3.h
@@ -57,6 +57,8 @@ struct _GeglOperationPointComposer3Class
 
 GType gegl_operation_point_composer3_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationPointComposer3, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-point-filter.h b/gegl/operation/gegl-operation-point-filter.h
index 4fde7ef..7e199c7 100644
--- a/gegl/operation/gegl-operation-point-filter.h
+++ b/gegl/operation/gegl-operation-point-filter.h
@@ -70,6 +70,8 @@ struct _GeglOperationPointFilterClass
 
 GType gegl_operation_point_filter_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationPointFilter, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-point-render.h b/gegl/operation/gegl-operation-point-render.h
index 24237c3..248093e 100644
--- a/gegl/operation/gegl-operation-point-render.h
+++ b/gegl/operation/gegl-operation-point-render.h
@@ -57,6 +57,8 @@ struct _GeglOperationPointRenderClass
 
 GType gegl_operation_point_render_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationPointRender, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-sink.h b/gegl/operation/gegl-operation-sink.h
index 7012ec5..de10d33 100644
--- a/gegl/operation/gegl-operation-sink.h
+++ b/gegl/operation/gegl-operation-sink.h
@@ -62,6 +62,8 @@ GType    gegl_operation_sink_get_type   (void) G_GNUC_CONST;
 
 gboolean gegl_operation_sink_needs_full (GeglOperation *operation);
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationSink, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-source.h b/gegl/operation/gegl-operation-source.h
index 4b15e9c..08ba570 100644
--- a/gegl/operation/gegl-operation-source.h
+++ b/gegl/operation/gegl-operation-source.h
@@ -55,6 +55,8 @@ struct _GeglOperationSourceClass
 
 GType gegl_operation_source_get_type (void) G_GNUC_CONST;
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationSource, g_object_unref)
+
 G_END_DECLS
 
 #endif
diff --git a/gegl/operation/gegl-operation-temporal.h b/gegl/operation/gegl-operation-temporal.h
index d7058ee..8c6cbf5 100644
--- a/gegl/operation/gegl-operation-temporal.h
+++ b/gegl/operation/gegl-operation-temporal.h
@@ -67,6 +67,7 @@ guint gegl_operation_temporal_get_history_length (GeglOperation *op);
 GeglBuffer *gegl_operation_temporal_get_frame (GeglOperation *op,
                                                gint           frame);
 
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglOperationTemporal, g_object_unref)
 
 G_END_DECLS
 


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