[gnome-photos/gnome-3-24] operation-svg-multiply: Silence -Wimplicit-function-declaration, etc.



commit b8cfb8945a35206363fd4e06c902eb6208eb5b95
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 11 20:19:13 2017 +0200

    operation-svg-multiply: Silence -Wimplicit-function-declaration, etc.
    
    GeglOperation sub-classes didn't provide autocleanups with GEGL
    0.3.14, which is the version that is required by the gnome-3-24
    branch. Those were added later. It is also problematic to carry the
    autocleanups in GNOME Photos, because that will break the build with
    newer GEGL versions.
    
    Since it is not nice to bump the requirement in a stable branch, the
    easiest option is to use the old-fashioned boilerplate instead.
    
    (The other option was to use #ifdef's based on the GEGL version, but
    that's needlessly messy.)
    
    Fallout from f859aa71b4537d5a787d89689757a5ede602f7d4

 src/photos-operation-svg-multiply.c |    6 ++++++
 src/photos-operation-svg-multiply.h |   20 ++++++++++++++------
 2 files changed, 20 insertions(+), 6 deletions(-)
---
diff --git a/src/photos-operation-svg-multiply.c b/src/photos-operation-svg-multiply.c
index e1a2394..bece6f1 100644
--- a/src/photos-operation-svg-multiply.c
+++ b/src/photos-operation-svg-multiply.c
@@ -23,6 +23,7 @@
 
 #include <babl/babl.h>
 #include <gegl.h>
+#include <gegl-plugin.h>
 
 #include "photos-operation-svg-multiply.h"
 
@@ -33,6 +34,11 @@ struct _PhotosOperationSvgMultiply
   gboolean srgb;
 };
 
+struct _PhotosOperationSvgMultiplyClass
+{
+  GeglOperationPointComposerClass parent_class;
+};
+
 enum
 {
   PROP_0,
diff --git a/src/photos-operation-svg-multiply.h b/src/photos-operation-svg-multiply.h
index 0aa0357..e5f6c12 100644
--- a/src/photos-operation-svg-multiply.h
+++ b/src/photos-operation-svg-multiply.h
@@ -21,18 +21,26 @@
 #ifndef PHOTOS_OPERATION_SVG_MULTIPLY_H
 #define PHOTOS_OPERATION_SVG_MULTIPLY_H
 
-#include <gegl-plugin.h>
+#include <glib-object.h>
 
 #include "photos-gegl.h"
 
 G_BEGIN_DECLS
 
 #define PHOTOS_TYPE_OPERATION_SVG_MULTIPLY (photos_operation_svg_multiply_get_type ())
-G_DECLARE_FINAL_TYPE (PhotosOperationSvgMultiply,
-                      photos_operation_svg_multiply,
-                      PHOTOS,
-                      OPERATION_SVG_MULTIPLY,
-                      GeglOperationPointComposer);
+
+#define PHOTOS_OPERATION_SVG_MULTIPLY(obj) \
+  (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+   PHOTOS_TYPE_OPERATION_SVG_MULTIPLY, PhotosOperationSvgMultiply))
+
+#define PHOTOS_IS_OPERATION_SVG_MULTIPLY(obj) \
+  (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+   PHOTOS_TYPE_OPERATION_SVG_MULTIPLY))
+
+typedef struct _PhotosOperationSvgMultiply      PhotosOperationSvgMultiply;
+typedef struct _PhotosOperationSvgMultiplyClass PhotosOperationSvgMultiplyClass;
+
+GType            photos_operation_svg_multiply_get_type       (void) G_GNUC_CONST;
 
 G_END_DECLS
 


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