Re: [GnomeMeeting-devel-list] [PATCH] removes unneeded begin/end call notification in text-chat



Le sam 24/01/2004 à 20:16, PUYDT Julien a écrit :

> global: accessible from anywhere
> local: not global
> 

What I meant is that when you define a structure in a .h file, you are
not creating global variables, there are only global variables once you
instantiate the structure.


> If they're visible in a single file among several, they're local.
> 

They are global to that file if they are instantiated outside of the
scope of a function.

ex :

static int a;

void f ();
voif g ();

a is global.

but in :

void f ()
{
 int a;
}

a is local.


> Nice. May I propose the so-called "private struct" approach? (See the
> attached example for an example.)
> 

That's a good idea. I like the example and you can move things around to
be compliant with it. 

> Still, a quick look at the example should make us both happy (and
> perhaps it is possible for 1.00 ;-) )

Yes that is a good idea!
But I think you won't be able to get rid of things like GetMainWindow ()
that returns a pointer to the structure and thus permits to use internal
values. At least not before 1.00, but you can try.

Be careful with memory though, always check your changes with
MALLOC_CHECK_=2 so that bugs do not stay hidden :)
-- 
 _      Damien Sandras
(o-     
//\     It-Optics s.a.
v_/_    GnomeMeeting: http://www.gnomemeeting.org/
        FOSDEM 2004:  http://www.fosdem.org
        H.323 phone:  callto:ils.seconix.com/dsandras seconix com




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