[phobos] review for environment

Andrei Alexandrescu andrei at erdani.com
Thu Oct 28 11:28:25 PDT 2010


Thanks for the response.

Andrei

On 10/27/10 22:05 CDT, Steve Schveighoffer wrote:
>
>
>
>
> ----- Original Message ----
>> From: Andrei Alexandrescu<andrei at erdani.com>
>>
>> Yah, I was referring to opAA.
>
> With Posix, you have environment variables stored in a __gshared global.
> Providing a local range on that data isn't a good idea.  Windows provides the
> function GetEnvironmentStrings, which returns a memory block allocated to hold
> all the environment variables.  You must call FreeEnvironmentStrings to free the
> memory.
>
> These are the only ways to iterate variables.  If you want individual variables
> for which you already know the names, there are functions for that, but Lars'
> code implements those through individual functions, not toAA.
>
> The only way I could see it done better is to have a type that allows setting of
> the variables when you assign to the AA.  But you still need to copy the data.
>
> -Steve
>
>
>
>
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


More information about the phobos mailing list