Re: some improvements to gmodule-win32 and gthread-win32
- From: BENOIT CARPENTIER <gtkool_2kx yahoo fr>
- To: muppet <scott asofyet org>
- Cc: gtk-devel-list gnome org
- Subject: Re: some improvements to gmodule-win32 and gthread-win32
- Date: Thu, 13 May 2004 22:19:01 +0200 (CEST)
--- muppet <scott asofyet org> a écrit : >
> carpentier benoît said:
> > in g_thread_impl_init () :
> > is it useful to have :
> > static gboolean beenhere = FALSE;
> > ...
> > if (beenhere)
> > return;
> >
> > beenhere = TRUE;
> >
> > why not having initialiszd beenhere to TRUE
> directly ?
>
> Because otherwise it wouldn't work. The "static" is
> very important --- that
> means that this variable will hold its value through
> all invocations of the
> function; the initialization to FALSE happens at
> program startup time
> (actually, at compile time, i believe). This code
> basically means, by default
> we have not been here; the first time we run through
> it, we will set the flag,
> and on all subsequent invocations we will bail out
> early.
Hello,
Thanks for your explanation, I think I understand this
now.
Benoît Carpentier
Yahoo! Mail : votre e-mail personnel et gratuit qui vous suit partout !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/
Dialoguez en direct avec vos amis grâce à Yahoo! Messenger !Téléchargez Yahoo! Messenger sur http://fr.messenger.yahoo.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]