Re: [gtk-list] Re: problem with gtk_signal_connect_object
- From: Tim Janik <timj gtk org>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: problem with gtk_signal_connect_object
- Date: Wed, 20 May 1998 13:45:19 +0200 (CEST)
On Wed, 20 May 1998, Stefan Wille wrote:
> > > gtk_signal_connect_object (object, "destroy",
> > > GTK_SIGNAL_FUNC (g_free),
> > > GTK_OBJECT (some_data_associated_with_object));
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > this should have been
> > (GtkObject*) some_data_associated_with_object
>
> If the function will take a void* as 4th argument, not just a
> GtkObject*,
> shouldn't the prototype be:
>
> guint gtk_signal_connect_object (GtkObject
> *object,
> const gchar *name,
> GtkSignalFunc func,
> gpointer
> *func_data);
>
> just like for gtk_signal_connect? The required cast to GtkObject* seems
> to be
> unnecessary and misleading (it was for me).
well it should better look like
guint gtk_signal_connect_object (GtkObject *object,
const gchar *name,
GtkSignalFunc func,
gpointer slot_object);
to keep the argument names decriptive/consistent...
> It should be possible to make the change without breaking existing code,
> because GtkObject* should be compatible with gpointer.
but, you are probably right and we can savely make that change...
>
> Stefan
>
---
ciaoTJ
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]