Re: Signals with gchar** arguments
- From: Emmanuele Bassi <ebassi gmail com>
- To: gtk-devel-list gnome org
- Subject: Re: Signals with gchar** arguments
- Date: Thu, 15 Nov 2007 13:06:44 +0000
On Thu, 2007-11-15 at 12:52 +0100, Mathias Hasselmann wrote:
> static void
> authenticate (SoupSession *session,
> /* other arguments... */
> gchar **username,
> gchar **password,
> gpointer user_data)
> {
> /* ... */
>
> g_free (*username);
> *username = g_strdup (lookup_username ());
>
> /* ... */
> }
>
> Notice that this use of "gchar**" arguments is different from the usage
> as "NULL terminated arrays of strings", aka. "G_TYPE_STRV".
this is probably the most evil use of signals I've seen in a while. ;-)
the SoupSession should really take a AuthenticateCallback function and
emit a signal on success or one on failure.
ciao,
Emmanuele.
--
Emmanuele Bassi,
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]