Re: callback parameters



Jeff Edwards, dans le message (.gtk.general:3053), a écrit :
> 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?

You can always call a function with more arguments than it requires,
because all stack handling is done in the caller's code. That's teh base
for varargs functions. The only thing the function has the right to change,
it what it takes as it arguments. If there are more, no problem.

The only problem is if you call a function with _less_ arguments, it can
destroy something it shouldn't in the stack, or use incorrect values.




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