On Wed, 2006-09-20 at 13:31 +0100, Gustavo J. A. M. Carneiro wrote:
> On Qua, 2006-09-20 at 13:52 +0200, Alexander Larsson wrote:
> > On Wed, 2006-09-20 at 12:55 +0200, Mathieu Lacage wrote:
> > > On Wed, 2006-09-20 at 12:31 +0200, Alexander Larsson wrote:
> > >
> > > > Here is my current GInputStream:
> > >
> > > very nice. Comments below.
> > >
> > > >
> > > > struct _GInputStreamClass
> > > > {
> > > > GObjectClass parent_class;
> > > >
> > > > /* Sync ops: */
> > > >
> > >
> > > Do you dislike the idea of moving the GError as a member of the
> > > GInputStream instance ?
> >
> > Its very uncommon, I'm not sure people will expect that. It will also
> > break things from language mappings that handle GErrors in a special way
> > (say, as an exception).
>
> Even from C, it "hides" the error, making programmers less likely to
> correctly realize they need to handle errors. Moreover, having a shared
> GError per object makes it impossible to ever make the API thread-safe.
The GError itself is only needed for "additional" information about what
went wrong. All the calls also have a way to easy check if the operation
worked or not, like a gboolean return or return -1 on error.
However, despite such technicallities I agree with you.
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Alexander Larsson Red Hat, Inc
[EMAIL PROTECTED] [EMAIL PROTECTED]
He's a genetically engineered vegetarian jungle king searching for his wife's
true killer. She's a foxy mutant barmaid prone to fits of savage, blood-crazed
rage. They fight crime!
_______________________________________________
gnome-vfs-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-vfs-list