[Xapian-discuss] Python bindings

James Aylett james-xapian at tartarus.org
Mon Jun 20 14:32:11 BST 2005


On Mon, Jun 20, 2005 at 02:11:21PM +0100, Olly Betts wrote:

> It looks like -Wshadow is broken on GCC 3.0.4 (I suspect it doesn't
> cope properly with inlining).  In maintainer mode we turn on -Werror
> with GCC 3.0 and up so that's why it's dying.
> 
> I've tweaked configure to only add -Wshadow for GCC 3.1 and up, so run
> "svn up" and try again.

Yes, that seems to have fixed things.

Having great difficulties getting the bindings to build - is there a
magic make variable I can set to tell it where SWIG 1.3.22 is?

> > > James: you made this change - any idea what's going on here?
> > 
> > The change is just to support the new API, where we don't set a window
> > but rather a parameter (IIRC). And I'm pretty certain that that /has/
> > worked for me at some stage.
> 
> The oddest thing is that the const was there before, but removing it now
> breaks (even if you force SWIG to ignore it).

SWIG is weird and wondrous :-)

(Also, that %extend spent 99% of its checked-in life being completely
unusable because the STL wrappers didn't actually pick it up - so it's
possible that my change was to get it to work in the first place ...)

> Traceback (most recent call last):
>   File "./smoketest.py", line 26, in ?
>     query = xapian.Query(xapian.Query.OP_OR, terms)
>   File "xapian.py", line 663, in __init__
>     newobj = _xapian.new_Query(*args)
> NotImplementedError: No matching function for overloaded 'new_Query'

Hmm. That's less useful than I remembered, and I really need to build
it myself to investigate - because I'll need to step through the C++
part of the wrappers, I think. The overloading is done in a reasonable
unpleasant way, and I really wish I could write my own code to do it,
because I could do a better job of it :-)

(There's some mess about being unable to take full advantage of
typemaps in overload dispatchers where one of the dispatch targets is
synthetic, ie something introduced using %extend. I can't remember the
details, and I /thought/ I'd got it to work, at least in this case ...)

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james at tartarus.org                               uncertaintydivision.org



More information about the Xapian-discuss mailing list