Re: [perl #58988] [RFC] Parrot_get_runtime_prefix function

2008-10-21 Thread Reini Urban
2008/9/17 via RT NotFound <[EMAIL PROTECTED]>: > # New Ticket Created by NotFound > # Please include the string: [perl #58988] > # in the subject line of all future correspondence about this issue. > # http://rt.perl.org/rt3/Ticket/Display.html?id=58988 > > > > Th

Re: [perl #58988] [RFC] Parrot_get_runtime_prefix function

2008-10-20 Thread NotFound
> 'STRING *' is vastly preferable to 'char *' anywhere it can be used. > Mark the old one as deprecated, replace all calls to > 'Parrot_get_runtime_prefix' with calls to 'Parrot_get_runtime_path', and > after a standard one release deprecation

Re: [perl #58988] [RFC] Parrot_get_runtime_prefix function

2008-10-19 Thread Allison Randal
NotFound (via RT) wrote: The Parrot_get_runtime_prefix in src/library.c return a char *, forcing the places that currently uses it to be more complicated than desired for no real gain. I added and used a STRING * variant named Parrot_get_runtime_path (that name makes more sense to me) in r31216

[perl #58988] [RFC] Parrot_get_runtime_prefix function

2008-09-18 Thread via RT
# New Ticket Created by NotFound # Please include the string: [perl #58988] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=58988 > The Parrot_get_runtime_prefix in src/library.c return a char *, forcing the places t

[perl #44025] Parrot_get_runtime_prefix shouldn't be dual-lived

2007-07-18 Thread via RT
# New Ticket Created by Andy Lester # Please include the string: [perl #44025] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=44025 > The behavior of Parrot_get_runtime_prefix depends on if you pass a **prefix_str

Re: Parrot_get_runtime_prefix has a bad interface

2007-06-22 Thread chromatic
On Saturday 16 June 2007 23:41:30 Andy Lester wrote: > I cringe at functions where the behavior is dependent on parms passed > in. In the case of Parrot_get_runtime_prefix, if you call it as > Parrot_get_runtime_prefix(&str) then str is populated, or if you call > Parrot_get_run

Re: Parrot_get_runtime_prefix has a bad interface

2007-06-17 Thread Mike Mattie
On Sun, 17 Jun 2007 01:41:30 -0500 Andy Lester <[EMAIL PROTECTED]> wrote: > I cringe at functions where the behavior is dependent on parms > passed in. In the case of Parrot_get_runtime_prefix, if you call it > as Parrot_get_runtime_prefix(&str) then str is populate

Parrot_get_runtime_prefix has a bad interface

2007-06-16 Thread Andy Lester
I cringe at functions where the behavior is dependent on parms passed in. In the case of Parrot_get_runtime_prefix, if you call it as Parrot_get_runtime_prefix(&str) then str is populated, or if you call Parrot_get_runtime_prefix(NULL) then you get a malloced string. It should be s

Re: [perl #42947] [PATCH] revise Parrot_get_runtime_prefix API for safety and usablility

2007-05-15 Thread Mike Mattie
ubject line of all future correspondence about this issue. > > # http://rt.perl.org/rt3/Ticket/Display.html?id=42947 > > > > > > > Hello, > > > > This patch changes the Parrot_get_runtime_prefix API from > > > > char* Parrot_get_runtime_prefix(

Re: [perl #42947] [PATCH] revise Parrot_get_runtime_prefix API for safety and usablility

2007-05-15 Thread Paul Cochrane
h changes the Parrot_get_runtime_prefix API from char* Parrot_get_runtime_prefix(Interp *interp, STRING **prefix_str) to STRING* Parrot_get_runtime_prefix (Interp *interp ) { This is done to make the routine safer, it no longer can leak memory. Also the useless "." paths are removed

[perl #42947] [PATCH] revise Parrot_get_runtime_prefix API for safety and usablility

2007-05-14 Thread via RT
# New Ticket Created by Mike Mattie # Please include the string: [perl #42947] # in the subject line of all future correspondence about this issue. # http://rt.perl.org/rt3/Ticket/Display.html?id=42947 > Hello, This patch changes the Parrot_get_runtime_prefix API from c

Re: [PATCH] refactor Parrot_get_runtime_prefix, more simple,robust

2007-05-07 Thread Mike Mattie
On Mon, 7 May 2007 01:24:32 -0700 Mike Mattie <[EMAIL PROTECTED]> wrote: > Hello, > > I was looking at Parrot_get_runtime_prefix as an example of getting > environment variable values the parrot way. The function looked > over-complicated so I tried a refactor. [snip] &

[PATCH] refactor Parrot_get_runtime_prefix, more simple,robust

2007-05-07 Thread Mike Mattie
Hello, I was looking at Parrot_get_runtime_prefix as an example of getting environment variable values the parrot way. The function looked over-complicated so I tried a refactor. The first thing to notice about the function is that it is possible to leak memory with a call. I did not find any

Re: Parrot_get_runtime_prefix

2005-02-23 Thread Leopold Toetsch
William Coleda <[EMAIL PROTECTED]> wrote: > in src/library.c (main branch), I find: > const char* > Parrot_get_runtime_prefix(Interp *interpreter, STRING **prefix_str) > { > static STRING *s; > static int init_done; ^^ > init_done is never initialized

Parrot_get_runtime_prefix

2005-02-22 Thread William Coleda
in src/library.c (main branch), I find: const char* Parrot_get_runtime_prefix(Interp *interpreter, STRING **prefix_str) { static STRING *s; static int init_done; static const char *prefix; int free_env; char *env; if (!*runtime_prefix) return NULL; if (!init_done