On Thu, Aug 28, 2008 at 10:09 PM, Henrik Nordstrom
<[EMAIL PROTECTED]> wrote:
> On tor, 2008-08-28 at 23:26 +1200, Amos Jeffries wrote:
>
>> > +const char *
>> > +urlAbsolute(const HttpRequest * req, const char *relUrl)
>> > +{
>> > +    LOCAL_ARRAY(char, portbuf, 32);
>> > +    LOCAL_ARRAY(char, urlbuf, MAX_URL);
>>
>> LOCAL_ARRAY is unfortunately not thread safe. Someone else may argue,
>> but I prefer to see them dead.
>
> I have always wanted to see them dead for many reasons.
>
> * On reasonable systems (i.e. most non-dos) the stack is a very suitable
> place for temporary allocations.
>
> * Using a static local array as return value will bite you from time to
> time even without threading, and is absolutely not thread safe..

Ironic.. this was exactly the reason why I started coding String-ng
(now temporarily renamed KBuf).


-- 
 /kinkie

Reply via email to