Re: [CODE] Better argument processing

From: George (greerga@DRAGON.HAM.MUOHIO.EDU)
Date: 09/20/97


On Fri, 19 Sep 1997, Andrew Helm wrote:

>>         static ARGS arguments;

>>         return &arguments;

>It looks good, but is it safe? Can you return a pointer to a static
>variable in the function? (Or rather, not "can" you, but is it going
>to mess up any compilers/platforms, that is, is such a thing okay
>in ANSI C?).

Return a pointer to a static variable with a multithreaded application and
you'll be shot.  Otherwise it's ok, CircleMUD does it already in a couple
functions.

--
George Greer  -  Me@Null.net   | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/08/00 PST