On Tue, May 8, 2012 at 10:24 AM, David Mertens <dcmertens.p...@gmail.com> wrote: > To those not CC'd: > > I posted a question on p5p and Nicholas Clark pointed out that sv_cmp looks > like it's *exactly* what you need, both as a general comperator, and as a > means to implement eq, lt, gt, etc. Does this look right?
David Thanks for taking that initiative. I was a little shy about asking on P5P for some reason; I guess I wasn't sure if I was asking the right question. It looks like sv_cmp is the right tool for the job. It's unfortunate that the API is so opaque in this area. One of Perl's strengths is text processing, but when writing XS extension code that should "just work" regardless of whether the text handed to it is Unicode or not, that strength is stripped away if nobody can figure out how to do it. I think you and Nicholas made progress. I probably won't have a chance to work with it for a few days, but when I do I'll be sure to discuss my experiences here on the Inline list (hopefully on-topic since I'll use Inline::C or maybe Inline::CPP and then possibly Rob's c2xs or cpp2xs. Dave -- David Oswald daosw...@gmail.com