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

Changing argv to be a ResizableStringArray complications

0 views
Skip to first unread message

Joshua Isom

unread,
Jan 12, 2006, 9:44:14 PM1/12/06
to perl6-i...@perl.org
With the attached patch, which changes argv to be a
ResizableStringArray instead of an SArray, when argv reaches the pir
execution, four null strings are prepended to argv. Running parrot
with -D8 prints the argv without those four null strings. The comment
above the change indicates eventually changing it to be a
ResizableStringArray, but these four null strings are an issue against
that. I can't understand why it's doing that, maybe someone else can
understand it.

embed.patch

Leopold Toetsch

unread,
Jan 13, 2006, 5:50:14 AM1/13/06
to Joshua Isom, perl6-i...@perl.org

On Jan 13, 2006, at 3:44, Joshua Isom wrote:

> With the attached patch, which changes argv to be a
> ResizableStringArray instead of an SArray, when argv reaches the pir
> execution, four null strings are prepended to argv.

The SArray needs presizing (line 467), but still does push_string from
the start.
The ResizableStringArray is more regular, you just push items onto it.

This was discussed some time ago. The main problem is that
set_integer_native on arrays may have 2 different meanings: reserve
storage or set the real size.

leo

0 new messages