]> Sergey Matveev's repositories - public-inbox.git/commitdiff
searchidx: call "++" on PostingIterator instead of "->inc"
authorEric Wong <e@80x24.org>
Sun, 22 Dec 2019 22:17:38 +0000 (22:17 +0000)
committerEric Wong <e@80x24.org>
Tue, 24 Dec 2019 03:47:04 +0000 (03:47 +0000)
The "++" is not yet available in the SWIG-based "Xapian.pm" Perl
bindings, so use "++" where it's supported in both the XS
(Search::Xapian) and SWIG-based Xapian binding.

lib/PublicInbox/SearchIdx.pm

index 926fac803264288cf3a298b68c08cba62a59dfec..b56fd0ee5f45569b14d52476ea256e031a5ec11f 100644 (file)
@@ -384,7 +384,7 @@ sub batch_do {
                my ($head, $tail) = $self->find_doc_ids($termval);
                return if $head == $tail;
                my @ids;
-               for (; $head != $tail && @ids < $batch_size; $head->inc) {
+               for (; $head != $tail && @ids < $batch_size; $head++) {
                        push @ids, $head->get_docid;
                }
                $cb->(\@ids);
@@ -439,7 +439,7 @@ sub remove_by_oid {
        # there is only ONE element in @delete unless we
        # have bugs in our v2writable deduplication check
        my @delete;
-       for (; $head != $tail; $head->inc) {
+       for (; $head != $tail; $head++) {
                my $docid = $head->get_docid;
                my $doc = $db->get_document($docid);
                my $smsg = PublicInbox::SearchMsg->wrap($mid);