Re: Errors in GTK Tutorial?

Trog <> writes:

> On 27-Jun-99 Peter Wilson wrote:
> > Thanks for explaining that Tim, and confirming that the tutorial
> > does
> > contain
> > many bugs due to this (as an example the delete_event handler in
> > the
> > improved
> > Hello World source incorrectly returns void rather than gboolean).
> Tim didn't confirm that the Tutorial contains bugs. You are lacking
> an understanding of how C handles function parameters if you think
> that having a mismatch causes stack corruption.

I'd say, if the handler for an event signal returns void, that is a
bug.  (Especially, for delete_event - as the return value here
determines not propagation, but whether the window is destroyed or

Yes, it won't cause stack corruption with the typical C calling
conventions, but that isn't the point... It's wrong, and it will cause
indeterminate results.

This mistake is far too common without getting it wrong
in the tutorial.


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