Re: GError update



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.

Regards,
                                        Owen




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