[EMAIL PROTECTED] (Simon Cozens) writes:

> =head2 C<unused>
> 
> This field is, as its name suggests, unused; however, it can be used to
> hold a pointer to the correct vtable for foreign strings.

Wouldn't it be better to put a vtable * directly inside struct
parrot_string instead of the 'encoding' enum? That would save the
'unused' slot for foreign encodings and you wouldn't need an
additional layer of wrapper functions (or another way of indirection)
for enc_foreign.

The small integer ids you need for transcoding table lookups,
etc. could be stored in a dedicated slot in the string vtables, or
returned by a vtable function.

-Edwin

Reply via email to