At 05:49 PM 4/8/2002 -0400, Roman Hunt wrote:
>hello:
>         and importance, but I feel up to the task.  (Read: "Please, be
>         patient with the newbie").  I have begun work on

The more the merrier, its been too quiet this last week.

>         find the definition for the string_vtable it is not in

Try classes/perlstring.pmc

Keep in mind there is the primitive STRING type which is the S* registers,
and then there is the PMC (PerlString) which uses vtables.

>         string.h as the pod states.  Also, what would be the standard
>         way to map a C string into a STRING would one just call
>         string_make passing a pointer to the char buffer  with
>         the correct encoding passed in, and the strings length into
>         len?

Looks correct, except make sure you watch where you stash
the STRING while you are working on it.

If you make calls to subroutines that may trigger a GC_collect()
then the STRING you had might be moved or collected.

For now the safest is the 'immortal' bit or stashing the STRING in a
register so the root set can see it.

The standard way to deal with this (as far as Parrot goes) is
still the topic of debate.

However, if all you are doing is allocating the STRING then doing a lot of
known ops and/or system calls that don't thread into the GC,
there is nothing to bother with.

Hope this helps,

-Melvin

Reply via email to