summaryrefslogtreecommitdiff
path: root/gdk-pixbuf/io-xpm.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdk-pixbuf/io-xpm.c')
-rw-r--r--gdk-pixbuf/io-xpm.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gdk-pixbuf/io-xpm.c b/gdk-pixbuf/io-xpm.c
index f6fd6a9be3..e6b80dab8e 100644
--- a/gdk-pixbuf/io-xpm.c
+++ b/gdk-pixbuf/io-xpm.c
@@ -24,10 +24,11 @@
#include <config.h>
#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <gdk/gdk.h>
-#include "gdk-pixbuf.h"
+#include "gdk-pixbuf-private.h"
@@ -309,11 +310,11 @@ mem_buffer (enum buf_op op, gpointer handle)
return NULL;
}
-/* Destroy notification function for the libart pixbuf */
+/* Destroy notification function for the pixbuf */
static void
-free_buffer (gpointer user_data, gpointer data)
+free_buffer (guchar *pixels, gpointer data)
{
- free (data);
+ free (pixels);
}
/* This function does all the work. */
@@ -429,7 +430,7 @@ pixbuf_create_from_xpm (const gchar * (*get_buf) (enum buf_op op, gpointer handl
g_free (colors);
g_free (name_buf);
- return gdk_pixbuf_new_from_data (pixels, ART_PIX_RGB, is_trans,
+ return gdk_pixbuf_new_from_data (pixels, GDK_COLORSPACE_RGB, is_trans, 8,
w, h, is_trans ? (w * 4) : (w * 3),
free_buffer, NULL);
}