[gegl] gegl-compression: avoid GLib macros when unavailable



commit ba15af66d775fd0c4bd29729f98fde1b8a648a64
Author: Ell <ell_se yahoo com>
Date:   Tue Dec 18 01:36:17 2018 -0500

    gegl-compression: avoid GLib macros when unavailable
    
    The GLib macros used in the previous commit were added in
    GLib 2.58, which is newer than the version we depend on.  Only use
    these macros when available, and provide our own definition
    otherwise.

 gegl/buffer/gegl-compression-rle.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-compression-rle.c b/gegl/buffer/gegl-compression-rle.c
index 9114ff8f2..b96b814e8 100644
--- a/gegl/buffer/gegl-compression-rle.c
+++ b/gegl/buffer/gegl-compression-rle.c
@@ -28,6 +28,15 @@
 #define RLE_DECOMPRESS_REPEAT_UNROLL   16
 
 
+#ifdef G_GNUC_NO_INLINE
+  #define RLE_NOINLINE G_GNUC_NO_INLINE
+#elif defined (__GNUC__)
+  #define RLE_NOINLINE __attribute__ ((noinline))
+#else
+  #define RLE_NOINLINE
+#endif
+
+
 #ifdef RLE_BITS
 
 
@@ -41,7 +50,7 @@
 
 /*  private functions  */
 
-G_GNUC_NO_INLINE
+RLE_NOINLINE
 static gboolean
 gegl_compression_rle_compress_pass (const guint8 *data,
                                     gint          n,
@@ -311,7 +320,7 @@ end:
 
 /*  private functions  */
 
-G_GNUC_NO_INLINE
+RLE_NOINLINE
 static void
 gegl_compression_rle_decompress_pass (guint8        *data,
                                       gint           n,


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