Dan Sugalski <[EMAIL PROTECTED]> wrote:

>     print $foo[0];
> is
>    foo->get_string[UTF_8](ARRAY, 0);
> while
>    print $foo
> is
>    foo->get_string[UTF_8](SCALAR);

Just to clarify:

does the get_string method in an AV's vtable do an indexing lookup,
grab the relevant SV pointer, then call that SV's get_string() method,
and forward the return value? ie

char * AV_get_string_utf8(AV *av, int index) {
        SV* sv = av->whatever[index];
        return sv->get_string[UTF_8](sv);
}

What advantage(s) does this buy?
I can see some obvious disadvantages here - AV implementers have to
include a whole bunch of boilerplate code for methods which are of
no concern to them, and lots of parameters and return values have
to be passed back and forth unnecessarily.

Dave M.


Reply via email to