fixes to handle broken libart_lgpl 2.3.18+ headers
authorPaul Davis <paul@linuxaudiosystems.com>
Thu, 1 Mar 2007 18:28:04 +0000 (18:28 +0000)
committerPaul Davis <paul@linuxaudiosystems.com>
Thu, 1 Mar 2007 18:28:04 +0000 (18:28 +0000)
git-svn-id: svn://localhost/ardour2/trunk@1539 d708f5d6-7413-0410-9779-e7cbd77b26cf

gtk2_ardour/canvas-imageframe.h
gtk2_ardour/utils.cc

index 6c2e5ab8b6fe0400b6157f89626a3de7b8f0b49c..48c981cb3636fe60e81b79c3c979179f9f860cf8 100644 (file)
 
 #include <libgnomecanvas/libgnomecanvas.h>
 #include <gtk/gtkenums.h> 
+
+extern "C" {
+/* some versions of libart contain functions not inside an extern C block */
 #include <libart_lgpl/art_misc.h>
+}
 #include <libart_lgpl/art_pixbuf.h>
 
 
index 1057773ae704195be8006686a13462f4ea885ca7..396940284b3c273c04a71c592bda634ed328e6bc 100644 (file)
@@ -119,7 +119,7 @@ xpm2rgb (const char** xpm, uint32_t& w, uint32_t& h)
                return 0;
        }
 
-       savergb = rgb = (unsigned char*)art_alloc (h * w * 3);
+       savergb = rgb = (unsigned char*) malloc (h * w * 3);
        
        // LOAD XPM COLORMAP LONG ENOUGH TO DO CONVERSION
        for (t = 0; t < colors; ++t) {
@@ -162,7 +162,7 @@ xpm2rgba (const char** xpm, uint32_t& w, uint32_t& h)
                return 0;
        }
 
-       savergb = rgb = (unsigned char*)art_alloc (h * w * 4);
+       savergb = rgb = (unsigned char*) malloc (h * w * 4);
        
        // LOAD XPM COLORMAP LONG ENOUGH TO DO CONVERSION