[Xapian-discuss] FIXMEs in Search::Xapian
Tim Brody
tdb2 at ecs.soton.ac.uk
Tue Sep 28 18:03:53 BST 2010
On Tue, 2010-09-28 at 15:51 +0100, Tim Brody wrote:
> There's something odd in perl/util.i:
> if ( ref( $item ) eq 'Search::Xapian::Query' ) {
> push(@arr, ref($item));
> } else {
> push(@arr, $item);
> }
>
> Calling newN directly segfaults:
> my $query = Search::Xapian::Query->new( "foo" );
> $query = Search::Xapian::newN(
> Search::Xapian::OP_AND,
> 2,
> [
> $query,
> "bar"
> ]
> );
After much faffing I've worked up a patch for the above segfault.
The minimal change is to replace the XS typemap with the correct (?)
SWIG typemap ... but I also simplified the code structure by passing an
ARRAY rather than ** + len.
Is there a list of SWIG macros c.f. perlapi?
Cheers,
Tim.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: perl_query_fix.diff
Type: text/x-patch
Size: 2669 bytes
Desc: not available
URL: <http://lists.xapian.org/pipermail/xapian-discuss/attachments/20100928/480c67e5/attachment.bin>
More information about the Xapian-discuss
mailing list