[Xapian-discuss] Query::Query() in PHP, also QueryParser::prefixes

Sam Liddicott sam@liddicott.com
Fri, 28 May 2004 12:25:01 +0100


----- Original Message ----- 
From: "Francis Irving" <francis@flourish.org>
To: <xapian-discuss@lists.xapian.org>
Sent: Thursday, May 27, 2004 4:38 PM
Subject: Re: [Xapian-discuss] Query::Query() in PHP, also
QueryParser::prefixes


> On Wed, May 26, 2004 at 11:19:07PM +0100, James Aylett wrote:
> > > I've attempted to fix this by modifying xapian.i.  I can't get the
> > > %rename clause to work for a constructor.
> >
> > It's now called %name, I think. I've managed to get it working for
> > constructors in the past, but admittedly not for a while.
>
> Aha!  Thank you.  Much more success.  I've tried this.
>
> %name(QueryCombine) Xapian::Query::Query(Xapian::Query::Query::op op_,
> %const Xapian::Query::Query & left, const Xapian::Query::Query &
> %right);
>
> It makes a PHP function called query_querycombine.  Unfortunately,
> the function takes a spurious extra Query argument as its first
> parameter.  SWIG thinks it is a member function, rather than a
> constructor.

Is this observation based on the C++ code that swig generates?

SAm