Re: callback parameters
- From: Havoc Pennington <hp redhat com>
- To: Jeff Edwards <ecsi sprynet com>
- Cc: gtk-list gnome org
- Subject: Re: callback parameters
- Date: 20 May 2000 00:23:08 -0400
Jeff Edwards <ecsi@sprynet.com> writes:
> Could someone please explain to me why it is reasonable to connect
> gtk_widget_destroy() to a button clicked signal, when
> gtk_widget_destroy() takes only one parameter?
>
> As far as I can tell by reading the GTK+ source code, the callbacks for
> button clicked signals (and every signal, for that matter) _always_ get
> called with at least two arguments. Won't calling a function that
> expects only one argument potentially screw up the stack? Admittedly, it
> seems of work OK in actual practive, but is it really legitimate?
>
It works on all systems anyone's tried GTK on (win32, pretty much any
UNIX, BeOS). But no, I'm pretty sure the C spec doesn't guarantee that
it will work. comp.lang.c is full of language lawyers who could tell
you. ;-)
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]