When porting a large body of code that relies on globals being willy-nilly
placed all over the place, it is just much easier to use the A5 trick
instead of creating the "globals bag" and having to change all the places in
the code where those globals are used from "gMyState = newState" to
"globalsP->gMyState = newState".  For a nominal level of effort up front,
you can leave your huge code base almost unchanged.

We have successfully used Ken Krugler's compiler magic in a couple of
projects (both a handspring shared library and a complicated library that
used the IR library) and I believe it did save us some work while creating
only a few minor headaches.

Kevin

> -----Original Message-----
> From: Richard Hartman [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 30, 2000 9:53 AM
> To: Palm Developer Forum
> Subject: Re: Globals in shared libraries and virtual drivers.
> 
> 
> Did you read the entire response, or stop after "you don't need ..."?
> 
> 
> What do you expect to get out of "real" globals that is not
> provided by the technique that Aaron suggested?
> 
> --
> -Richard M. Hartman
> [EMAIL PROTECTED]
> 
> 186,000 mi/sec: not just a good idea, it's the LAW!
> 
> 
> Petrus Wrang� wrote in message <15957@palm-dev-forum>...
> >
> >>  you dont need to use globals at ALL really.
> >
> >Sorry, I forgot to mention that I'm porting a rather large 
> piece of code.
> >And I really need the 'real' globals.
> >
> >
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to 
> unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/
> 

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to