On Wed, Jan 4, 2012 at 13:13, Andrew Dunstan <andrew@dunslane.net> wrote:
>
>
> On 01/04/2012 12:56 PM, Tom Lane wrote:
>> I looked at that last night but it appeared that SvOK would be perfectly
>> happy. (Didn't actually try it, though, I was just eyeballing the flags
>> in gdb.)
>
> I tested it and you're right, it doesn't help. I don't see what else we can
> do about it. There doesn't appear to be any test for an SV in the API.
I think about the best we can do is something along the lines of:
sv2cstr()
{
... if (Perl_vverify(sv)) return utf_u2e(SvPV(sv));
...
}
I dont the the utf_u2e is strictly needed (other than that it strdups)
as I don't think versions can have utf8 chars, or at least that $^V
will not have utf8 chars (and even if it did it would only cause
problems if they had codepoints in >128 <255).
We would still have issues with typeglobs...