Re: gdk_pixbuf_loader_write and short files
- From: "Matthias Clasen" <matthiasc poet de>
- To: <gtk-devel-list gnome org>
- Subject: Re: gdk_pixbuf_loader_write and short files
- Date: Tue, 28 Aug 2001 23:41:38 +0200
----- Original Message -----
From: "Havoc Pennington" <hp redhat com>
To: "Matthias Clasen" <matthiasc poet de>
Cc: <gtk-devel-list gnome org>
Sent: Tuesday, August 28, 2001 11:28 PM
Subject: Re: gdk_pixbuf_loader_write and short files
>
> "Matthias Clasen" <matthiasc poet de> writes:
> > Thats why I added retval as a condition in the following if, maybe you
> > missed that.
> > I was under the impression that gdk_pixbuf_loader_load_module would
> > return false if it an error occurred, in addition to possibly
> > setting error.
>
> I did miss it, but it looks like load_module actually returns the
> number of bytes handled so far or something.
>
Looking at the calls of that function in gdk-pixbuf-loader.c:
l.308: if (gdk_pixbuf_loader_load_module (loader, NULL, error) == 0)
return 0;
l.432: tmp = NULL;
gdk_pixbuf_loader_load_module (retval, image_type, &tmp);
if (tmp != NULL)
g_propagate_error (error, tmp);
g_object_unref (G_OBJECT (retval));
return NULL;
}
So it seems that both ways of checking load_module errors are acceptable.
Tell
me which style you prefer and I'll adjust my patch.
Matthias
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]