gdk-pixbuf patch



hi

yesterday trying to compile abiword from cvs i found that gdk-pixbuf has
a variable called private that g++  doesn't like. Here is a patch

Diego

? archivo.diff
Index: gdk-pixbuf-loader.c
===================================================================
RCS file: /cvs/gnome/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-loader.c,v
retrieving revision 1.35
diff -u -5 -r1.35 gdk-pixbuf-loader.c
--- gdk-pixbuf-loader.c	2000/07/19 23:36:42	1.35
+++ gdk-pixbuf-loader.c	2001/04/25 22:27:49
@@ -188,11 +188,11 @@
 gdk_pixbuf_loader_init (GdkPixbufLoader *loader)
 {
 	GdkPixbufLoaderPrivate *priv;
 
 	priv = g_new0 (GdkPixbufLoaderPrivate, 1);
-	loader->private = priv;
+	loader->priv = priv;
 }
 
 static void
 gdk_pixbuf_loader_destroy (GtkObject *object)
 {
@@ -201,11 +201,11 @@
 
 	g_return_if_fail (object != NULL);
 	g_return_if_fail (GDK_IS_PIXBUF_LOADER (object));
 
 	loader = GDK_PIXBUF_LOADER (object);
-	priv = loader->private;
+	priv = loader->priv;
 
 	if (!priv->closed)
 		gdk_pixbuf_loader_close (loader);
 
 	if (priv->animation)
@@ -222,11 +222,11 @@
 {
 	GdkPixbufLoader *loader;
 	GdkPixbufLoaderPrivate *priv = NULL;
 
 	loader = GDK_PIXBUF_LOADER (object);
-	priv = loader->private;
+	priv = loader->priv;
 
 	g_free (priv);
 
 	if (GTK_OBJECT_CLASS (parent_class)->finalize)
 		(* GTK_OBJECT_CLASS (parent_class)->finalize) (object);
@@ -235,11 +235,11 @@
 static void
 gdk_pixbuf_loader_prepare (GdkPixbuf *pixbuf, gpointer loader)
 {
 	GdkPixbufLoaderPrivate *priv = NULL;
 
-	priv = GDK_PIXBUF_LOADER (loader)->private;
+	priv = GDK_PIXBUF_LOADER (loader)->priv;
 	gdk_pixbuf_ref (pixbuf);
 	g_assert (priv->pixbuf == NULL);
 
 	priv->pixbuf = pixbuf;
 	gtk_signal_emit (GTK_OBJECT (loader), pixbuf_loader_signals[AREA_PREPARED]);
@@ -248,11 +248,11 @@
 static void
 gdk_pixbuf_loader_update (GdkPixbuf *pixbuf, guint x, guint y, guint width, guint height, gpointer loader)
 {
 	GdkPixbufLoaderPrivate *priv = NULL;
 
-	priv = GDK_PIXBUF_LOADER (loader)->private;
+	priv = GDK_PIXBUF_LOADER (loader)->priv;
 
 	gtk_signal_emit (GTK_OBJECT (loader),
 			 pixbuf_loader_signals[AREA_UPDATED],
 			 x, y,
 			 /* sanity check in here.  Defend against an errant loader */
@@ -263,11 +263,11 @@
 static void
 gdk_pixbuf_loader_frame_done (GdkPixbufFrame *frame, gpointer loader)
 {
 	GdkPixbufLoaderPrivate *priv = NULL;
 
-	priv = GDK_PIXBUF_LOADER (loader)->private;
+	priv = GDK_PIXBUF_LOADER (loader)->priv;
 
 	priv->pixbuf = NULL;
 
 	if (priv->animation == NULL) {
 		priv->animation = g_new0 (GdkPixbufAnimation, 1);
@@ -303,11 +303,11 @@
 	GdkPixbufLoaderPrivate *priv = NULL;
 	GdkPixbufFrame    *frame;
 	GList *current = NULL;
 	gint h, w;
 
-	priv = GDK_PIXBUF_LOADER (loader)->private;
+	priv = GDK_PIXBUF_LOADER (loader)->priv;
 	priv->pixbuf = NULL;
 
 	current = gdk_pixbuf_animation_get_frames (priv->animation);
 
 	while (current) {
@@ -346,11 +346,11 @@
 }
 
 static int
 gdk_pixbuf_loader_load_module(GdkPixbufLoader *loader)
 {
-	GdkPixbufLoaderPrivate *priv = loader->private;
+	GdkPixbufLoaderPrivate *priv = loader->priv;
 
 	priv->image_module = gdk_pixbuf_get_module (priv->header_buf, priv->header_buf_offset);
 
 	if (priv->image_module == NULL)
 		return 0;
@@ -388,11 +388,11 @@
 
 static int
 gdk_pixbuf_loader_eat_header_write (GdkPixbufLoader *loader, const guchar *buf, size_t count)
 {
 	int nbytes;
-	GdkPixbufLoaderPrivate *priv = loader->private;
+	GdkPixbufLoaderPrivate *priv = loader->priv;
 
 	nbytes = MIN(LOADER_HEADER_SIZE - priv->header_buf_offset, count);
 	memcpy (priv->header_buf + priv->header_buf_offset, buf, nbytes);
 
 	priv->header_buf_offset += nbytes;
@@ -427,11 +427,11 @@
 	g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), FALSE);
 
 	g_return_val_if_fail (buf != NULL, FALSE);
 	g_return_val_if_fail (count >= 0, FALSE);
 
-	priv = loader->private;
+	priv = loader->priv;
 
 	/* we expect it's not to be closed */
 	g_return_val_if_fail (priv->closed == FALSE, FALSE);
 
 	if (priv->image_module == NULL) {
@@ -473,11 +473,11 @@
 	GdkPixbufLoaderPrivate *priv;
 
 	g_return_val_if_fail (loader != NULL, NULL);
 	g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL);
 
-	priv = loader->private;
+	priv = loader->priv;
 
 	if (priv->animation) {
 		GList *list;
 		
 		list = gdk_pixbuf_animation_get_frames (priv->animation);
@@ -508,11 +508,11 @@
 	GdkPixbufLoaderPrivate *priv;
 
 	g_return_val_if_fail (loader != NULL, NULL);
 	g_return_val_if_fail (GDK_IS_PIXBUF_LOADER (loader), NULL);
 
-	priv = loader->private;
+	priv = loader->priv;
 
 	return priv->animation;
 }
 
 /**
@@ -528,11 +528,11 @@
 	GdkPixbufLoaderPrivate *priv;
 
 	g_return_if_fail (loader != NULL);
 	g_return_if_fail (GDK_IS_PIXBUF_LOADER (loader));
 
-	priv = loader->private;
+	priv = loader->priv;
 
 	/* we expect it's not closed */
 	g_return_if_fail (priv->closed == FALSE);
 
 	/* We have less the 128 bytes in the image.  Flush it, and keep going. */
Index: gdk-pixbuf-loader.h
===================================================================
RCS file: /cvs/gnome/gdk-pixbuf/gdk-pixbuf/gdk-pixbuf-loader.h,v
retrieving revision 1.13
diff -u -5 -r1.13 gdk-pixbuf-loader.h
--- gdk-pixbuf-loader.h	2000/01/07 18:29:13	1.13
+++ gdk-pixbuf-loader.h	2001/04/25 22:27:49
@@ -47,11 +47,11 @@
 struct _GdkPixbufLoader
 {
 	GtkObject object;
 
 	/* < Private > */
-	gpointer private;
+	gpointer priv;
 };
 
 typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
 struct _GdkPixbufLoaderClass {
 	GtkObjectClass parent_class;


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