Re: GTK signals question.



Le 05/03/2014 18:07, Chris Vine a écrit :
On Wed, 05 Mar 2014 09:44:48 -0500
Chris Moller <moller mollerware com> wrote:
I was actually writing that testcase when I found a correlation: I'm 
using gcc and my callbacks were nested functions.  Pull the callbacks 
out and make them normal, top-level, functions, and it all works even 
without no blocking of any kind.  So, if this is a bug at all, I
suppose it could be a compiler bug.

Your question contained references to GTK+'s C interface.  If that
means that you are using C or C++ for your program, those languages do
not have a syntax for nested functions, so what you say does not really
make sense.  […]

GCC does, to some extent, accept nested functions in C as an extension.
 But of course, they are not real closures so even though they have
access to the parent scope, the symbols from there will not be valid
after the parent returned.

http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html

Regards,
Colomban


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