develooper Front page | perl.perl6.internals | Postings from September 2005

[perl #30631] [PATCH] Iterator support for Env PMC

From:
Bernhard Schmalhofer via RT
Date:
September 11, 2005 06:19
Subject:
[perl #30631] [PATCH] Iterator support for Env PMC
Message ID:
rt-3.0.11-30631-120571.2.0066385591236@perl.org
> Matt Kennedy <parrotbug-followup@parrotcode.org> wrote:
> 
> > The attached env.patch patches classes/env.pmc to add vtable methods
> > elements() and get_iter() and modifies get_string_keyed() to also
> > accept integer keys so that it is possible to use an Iterator on the
> > environment.

I have applied this patch and added implementation and tests for
'get_integer' and 'get_number'.

> > ... The patch uses the char **environ variable
The usage of 'char **environ' is only a little problematic.
It seems to be speced in POSIX.1, but not in ISO-C.
In http://search.cpan.org/~stas/Env-C-0.06/ there is only an include
switch for _BORLANDC.
It might be a good idea to provide wrappers in 'platform.c' for all
functions accession 'environ'.

The 'unsetenv'-problem, ticket 23025, is another issure related to
'environ'.

-- 
/* Bernhard.Schmalhofer@gmx.de */



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About