[Xapian-discuss] Python bindings...
Olly Betts
olly at survex.com
Sun Dec 11 04:12:31 GMT 2005
On Sat, Dec 10, 2005 at 09:03:51PM +0000, James Aylett wrote:
> Wow. I don't remember reading anything about precedences *anywhere* -
> it's not in the changes file as far as I can see, and it wasn't in the
> manual last time I read it. :-)
It's in the SWIG manual now, which is why I tried it...
> > I want to add a regression test
I've done this.
> > and also make sure that the related vector<Query> typemap works too.
I now have a typemap which matches the appropriate calls from Python,
but the PyObject pointers I get from PyList_GetItem aren't instances
according to PyInstance_Check. If I ignore that, then I get a SEGV.
So currently I'm a bit stumped what to try.
But I think this is a lesser issue - the vector<string> problem was
blocking creation of phrase queries (except via the QueryParser)
whereas this one can more easily be worked around.
Incidentally, any idea why the wrapping for vector<Query> looks for
a Python sequence while the vector<string> case looks for a Python
list? I've tried using a list instead for vector<Query> but it
doesn't seem to make a difference at all (perhaps a list is also
a sequence? I've failed to find detailed documentation for
PySequence_Check, etc...)
Cheers,
Olly
More information about the Xapian-discuss
mailing list