[Xapian-discuss] Python bindings

Olly Betts olly at survex.com
Mon Jun 20 14:11:21 BST 2005

On Mon, Jun 20, 2005 at 08:54:29AM +0100, James Aylett wrote:
> cc1plus: warnings being treated as errors
> /s1/james/projects/xapian/xapian/xapian-core/common/stats.h:308:
> warning: declaration
>    of `tname' shadows previous local

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.

> > 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).

> It would be worth someone who has a fully-built SVN trunk xapian-core
> and xapian-bindings altering simple* to give full exception stack
> trace (import traceback; traceback.print_exc() should do it) on this
> error, as there's detail missing from the error message which would be
> helpful in tracking down what's happening here. About 90% of
> maintenance of the Python bindings seems to be sorting out
> disambiguation of the constructor overloading ...

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'


More information about the Xapian-discuss mailing list