>>>>> "Autrijus" == Autrijus Tang <[EMAIL PROTECTED]> writes:
Autrijus> You may wish to use Parrot_call_sub's "SS" form, where
Autrijus> you pass in a string and get back a string. Something
Autrijus> like this:
Autrijus> my $interp = Parrot_new(undef);
Autrijus> # ... load a .pir file or some other code into
Autrijus> $interp ...
Autrijus> my $code_pmc = Parrot_find_global( $interp,
Autrijus> const_string("Namespace"), const_string("sub_name"), );
Autrijus> my $return_str = Parrot_call_sub( $interp,
Autrijus> $code_pmc, const_string("SS"),
Autrijus> const_string("Your_input_string_here"), );
The problem I'm finding with this, is getting back the returned string
characters.
I assume the void * returned is pointing to a Parrot String.
Certainly it's not a const char *.
There is a function declaration
Parrot_string_cstring
in string_funcs.h, but it appears to have no definitoon anywhere, so
that's not much use to me.
--
Colin Adams
Preston Lancashire