Re: GError update
- From: John Cupitt <john cupitt ng-london org uk>
- Cc: gtk-devel-list redhat com
- Subject: Re: GError update
- Date: Fri, 30 Jun 2000 15:55:51 +0100
Owen Taylor wrote:
> Eric Lemings <eric.b.lemings@lmco.com> writes:
> > Havoc Pennington wrote:
> > >
> > > GError* g_error_new (GQuark domain,
> > > gint code,
> > > const gchar *format,
> > > ...) G_GNUC_PRINTF (3, 4);
> > >
> > > GError* g_error_new_literal (GQuark domain,
> > > gint code,
> > > const gchar *message);
> >
> > Uh, I don't see the need for the second one since 'format' can be a
> > literal just like in printf.
>
> The reason for the second variant is so you can print out a string
> that might contain '%' characters without having to worry about
> escaping them.
That's true, but you can always do:
g_error_new( dmn, cde, "%s", str );
Not too much overhead, surely?
John
--
John Cupitt, john.cupitt@ng-london.org.uk, +44 (0)20 7747 2570
VASARI Lab, The National Gallery, Trafalgar Square, London, WC2N 5DN
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]