On 12/22/05, Ron Blaschke <[EMAIL PROTECTED]> wrote:
> Tuesday, December 20, 2005, 8:09:32 PM, François PERRAD wrote:
> > At 11:53 16/12/2005 +0100, you wrote:
>
> >>I can think of two ways to fix this:
> >>
> >>- Hide every env access behind the platform stuff. That is, add
> >>something like Parrot_environ.
>
> > For me, this way sounds better.
> > The platform/env.c already exists in only two flavors (generic & win32).
>
> Right. The format of GetEnvironmentStrings differs from _environ, so
> there's some conversion necessary.
>
> "
> LPVOID GetEnvironmentStrings(void);
>
> If the function succeeds, the return value is a pointer to the
> environment block of the current process.
> "
>
> Would this be a reasonable interface?
>
> char **
> Parrot_get_environ();
>
> void
> Parrot_free_environ(char **env);
>
> >>- Provide platform specific PMCs. That is, there are two different
> >>env.pmc implementations, depending on the platform. This would be
> >>simpler, more isolated and probably more efficient because it avoids
> >>another level of indirection.
>
> Ron
>
sorry for the late response. this seems quite reasonable. patches welcome :)
~jerry