[Xapian-discuss] Perl bindings and MatchSpy

Olly Betts olly at survex.com
Fri Aug 28 06:24:29 BST 2015


On Tue, Aug 25, 2015 at 10:45:12AM +0700, Andreas Marienborg wrote:
> If someone with more XS-exerpience could take a look and provide
> some feedback, that would be great.

Looks plausible to me.

I'd suggest that ~Enquire_perl() just call ref_clear_matchspies(NULL);
rather than repeating all its code inline.

> I created a pull request[1]. I would like to get the PerlMatchSpy thing
> working as well, but it might be better to get the wrapping of the 
> ValueCountMatchSpy merged/released regardless of the PerlMatchSpy
> thing?

The classes like perlMatchDecider are there to support passing a code
reference in Perl where the C++ API wants a functor object.

But Xapian::MatchSpy is rather more than just a function wrapped in a
class, so I'm not sure it's very useful to be able to pass a code
reference for it.  I guess you could store the information gained in
a global variable on the perl side.

Anyway, just being able to use ValueCountMatchSpy from perl is certainly
useful in itself.  I'll look at getting this merged soon.

Cheers,
    Olly



More information about the Xapian-discuss mailing list