develooper Front page | perl.perl5.porters | Postings from May 2008

Re: on the almost impossibility to write correct XS modules

From:
Rafael Garcia-Suarez
Date:
May 20, 2008 02:22
Subject:
Re: on the almost impossibility to write correct XS modules
Message ID:
b77c1dce0805200222t48888d0bw1bec90a71ef408dd@mail.gmail.com
2008/5/20 Glenn Linderman <perl@nevcal.com>:
> On approximately 5/20/2008 1:55 AM, came the following characters from the
> keyboard of Rafael Garcia-Suarez:
>
>> But sometimes we want perl to magically switch between Unicode and
>> non-Unicode semantics depending on the data it's handling. Does that
>> mean that we need to add a new kind of data to perl, "Unicode SV" ?
>> Will that solve problems ? What problems will this create ?
>
>
> Could you elaborate on when such a magical switcharoo is desirable?

Not really. That's an RFC. It's just that I imagine some people would
like it. That last proposal is not here to fix something, but to add
conveniency.

It might help XS writers too: if we get a "UnicodeSVPV" (in bytes or
in utf-8, that's orthogonal), and feed it to a C char* function that
expects a GIF image or something, then we know something is wrong in
the calling and we can throw an exception.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About