Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

$ENV{ICU_DATA_DIR}

2 views
Skip to first unread message

Steve Fink

unread,
May 30, 2004, 2:03:12 AM5/30/04
to perl6-i...@perl.org
Anyone mind if I commit this? One thing I'm not sure of, though -- I
try to behave myself and use Parrot_getenv rather than a plain
getenv(), but I'm not convinced the API is complete -- Parrot_getenv
saves back a boolean saying whether to free the returned string or
not, but what should I call to free it? I could call
Parrot_free_memalign, but who said anything about alignment? Perhaps
Parrot_getenv should simply return the string, and we should have a
platform-specific Parrot_freeenv that either frees the string or is a
no-op?

Whatever. For now, I'm just calling free() if Parrot_getenv() tells me
to. Which it probably never will.

icu_data_dir.patch

Leopold Toetsch

unread,
May 30, 2004, 6:03:12 AM5/30/04
to Steve Fink, perl6-i...@perl.org
Steve Fink <st...@fink.com> wrote:

> Anyone mind if I commit this?

The patch is fine.

> ... One thing I'm not sure of, though -- I


> try to behave myself and use Parrot_getenv rather than a plain
> getenv(), but I'm not convinced the API is complete -- Parrot_getenv
> saves back a boolean saying whether to free the returned string or
> not, but what should I call to free it?

It's for Win32. config/gen/platform/win32/env.c uses
C<mem_sys_allocate>, so it should be C<mem_sys_free>.


leo

Steve Fink

unread,
May 31, 2004, 3:27:29 PM5/31/04
to Leopold Toetsch, perl6-i...@perl.org

Thanks, patch applied. I went to add documentation on Parrot_getenv,
but found that it was already there in platform_interface.h. Doh!

Nicholas Clark

unread,
May 31, 2004, 4:36:35 PM5/31/04
to Steve Fink, perl6-i...@perl.org
On Sat, May 29, 2004 at 11:03:12PM -0700, Steve Fink wrote:

> + /* DEFAULT_ICU_DATA_DIR is configured at build time, or it may be
> + set through the $ICU_DATA_DIR environment variable. Need a way
> + to specify this via the command line as well. */
> + data_dir = Parrot_getenv("ICU_DATA_DIR", &free_data_dir);

Is ICU_DATA_DIR something the ICU folks define? Or something we define?
And if the latter, shouldn't it be called PARROT_ICU_DATA_DIR?

Nicholas Clark

Steve Fink

unread,
May 31, 2004, 4:38:58 PM5/31/04
to perl6-i...@perl.org

Fair enough. The rename has been committed.

0 new messages