[gst-devel] Signals in GStreamer ???

Jérôme Patey jerome.patey at open-plug.com
Wed Apr 20 01:03:16 CEST 2005


Tristan Van Berkom wrote:

> Jérôme Patey wrote:
> [...]
>
>>    What happens to the last parameter not used in the first function 
>> ? It will stay on the stack ? Then the program should crash...
>
>
> Nah,
>     it wont bother crashing ;-)
>
> Note that it's standard practice in GTK+ to ignore function params,
> a typical example is somthing like:
>
> g_signal_connect_swapped (G_OBJECT (quit_button), "clicked",
>                           G_CALLBACK (gtk_widget_destroy),
>                           (gpointer) main_window);
>
> Pretty hardcore, but efficient.
>
> Cheers,
>                                    -Tristan
>
> Note also that all object implementations have signal
> handlers which omit the last "NULL" argument, that argument
> is only used "user_data" arguments to g_signal_connect ().
>
>
It's really hardcore, because if the signal you connect to has 5 
parameters or more, and the target system is based on ARM, then it will 
crash !

-- 
Jerome Patey - jerome.patey at open-plug.com
Tools & Update

Open-Plug, Sophia-Antipolis, FRANCE
www.open-plug.com





More information about the gstreamer-devel mailing list