Ticket #448: xapian-bindings-1.0.17-stem-director.patch

File xapian-bindings-1.0.17-stem-director.patch, 1.9 KB (added by Evgeny Sizikov, 15 years ago)
  • xapian-bindings-1.0.17

    diff -urN xapian-bindings-1.0.17.orig/python/extra.i xapian-bindings-1.0.17/python/extra.i
    old new  
    737737TermGenerator.set_stopper = _termgenerator_set_stopper
    738738del _termgenerator_set_stopper
    739739
     740# When we set a Stem into the QueryParser, keep a python reference so it
     741# won't be deleted. This hack can probably be removed once xapian bug #186 is
     742# fixed.
     743__queryparser_set_stemmer_orig = QueryParser.set_stemmer
     744def _queryparser_set_stemmer(self, stem):
     745    self._stem = stem
     746    return __queryparser_set_stemmer_orig(self, stem)
     747_queryparser_set_stemmer.__doc__ = __queryparser_set_stemmer_orig.__doc__
     748QueryParser.set_stemmer = _queryparser_set_stemmer
     749del _queryparser_set_stemmer
     750
     751# When we set a Stem into the TermGenerator, keep a python reference so it
     752# won't be deleted. This hack can probably be removed once xapian bug #186 is
     753# fixed.
     754__termgenerator_set_stemmer_orig = TermGenerator.set_stemmer
     755def _termgenerator_set_stemmer(self, stem):
     756    self._stem = stem
     757    return __termgenerator_set_stemmer_orig(self, stem)
     758_termgenerator_set_stemmer.__doc__ = __termgenerator_set_stemmer_orig.__doc__
     759TermGenerator.set_stemmer = _termgenerator_set_stemmer
     760del _termgenerator_set_stemmer
     761
    740762def _enquire_check_deprec_args(reverse, kwargs, methodname):
    741763    """Check the keyword arguments to one of the enquire set_sort_* methods.
    742764   
  • xapian-bindings-1.0.17

    diff -urN xapian-bindings-1.0.17.orig/xapian.i xapian-bindings-1.0.17/xapian.i
    old new  
    901901
    902902}
    903903
     904%feature("director") Xapian::Stem;
    904905%feature("director") Xapian::Stopper;
    905906%feature("director") Xapian::ValueRangeProcessor;
    906907%ignore Xapian::QueryParser::internal;