[Xapian-devel] set_bias() in bindings

Richard Boulton richard at lemurconsulting.com
Wed Nov 8 16:03:51 GMT 2006

I'm trying to call Enquire.set_bias() from the python bindings.  This fails
as follows:

>>> db=xapian.Database('/home/richard/foo')
>>> enq=xapian.Enquire(db)
>>> enq.set_bias(1.0, 3600)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: in method 'Enquire_set_bias', argument 3 of type 'time_t'

I know that set_bias is a temporary API, but it would be good to be able to
use it as it is.  Is there some trick that can let this work that I don't
know of, or is a fix needed to the bindings?

As far as I can tell, the problem is that SWIG doesn't know about the
time_t type, and there is no definition of it in the xapian.i file (or the
files this pulls in).

I tried patching xapian-bindings/xapian.i to make things work on my system,
but no luck yet.

Any neat ideas, anyone?


More information about the Xapian-devel mailing list