[Xapian-discuss] Overloading in the PHP bindings

Olly Betts olly at survex.com
Thu Dec 15 11:56:38 GMT 2005


Up until now, the PHP bindings have renamed variants of overloaded
methods (or in some cases only wrapped some variants).  So for example
we have:

new_Query(STRING)
new_Query_from_query_pair(OP, QUERY, QUERY)
new_Query_from_term_pair(OP, STRING, STRING)
new_Query_empty()

And there's no wrapping of the C++ Query constructors which allow you
to pass a Query op plus a list of either terms or Query objects.

The reason for all this renaming was limitations in SWIG.  These have
now been fixed, and I've started writing the typemaps required to wrap
these all as new_Query.

What I'd like feedback on is whether anyone will be upset to see the
old forms dropped right away.  If we do this, it'll mean code will need
fixing to work on the next release, but the changes are very easy (just
change new_Query_* to new_Query, etc).

Cheers,
    Olly



More information about the Xapian-discuss mailing list