[Xapian-discuss] Python segmentation fault when abstracting value range processor
Richard Boulton
richard at lemurconsulting.com
Wed Mar 4 11:53:41 GMT 2009
On Wed, Mar 04, 2009 at 11:36:55AM +0000, James Aylett wrote:
> On Wed, Mar 04, 2009 at 11:23:10AM +0000, Olly Betts wrote:
>
> > Actually, another option might be to keep a reference to the Python VRP
> > proxy object in the Python QueryParser proxy object. I don't know how
> > feasible that is.
>
> That's pretty easy. We'd have to replace the registration call that
> puts the Xapian VRP object into the Xapian QueryParser, something
> like:
>
> ----------------------------------------------------------------------
> real_add_valuerangeprocessor = QueryParser.add_valuerangeprocessor
> def intercept_add_valuerangeprocessor(self, vrproc):
> self._vrps.append(vrproc)
> real_add_valuerangeprocessor(self, vrproc)
> QueryParser._vrps = []
> QueryParser.add_valuerangeprocessor = intercept_add_valuerangeprocessor
> ----------------------------------------------------------------------
>
> in python/extra.i should do it (untested). Of course, there are other
> similar situations :-/
This sounds like a good idea. Could someone write it up as a ticket? :)
--
Richard
More information about the Xapian-discuss
mailing list