[Xapian-devel] Objects in PHP4

Olly Betts olly at survex.com
Wed Sep 15 14:11:22 BST 2004


On Wed, Sep 15, 2004 at 09:46:34AM +0100, Sam Liddicott wrote:
> Prior to this in the generated module near to where argbase was 
> calculated there should have been a check to make sure that the right 
> number of arguments was passed in the first place.

That check is there and looks correct.

> I've not got  a lot of time as I'm travelling a lot but if you send me 
> the generated c++ file I will look and see if it is what was intended.

Sent by private mail (it's rather large).

> (It doesn't seem to be in the latest debian release)

Currently we run SWIG at build time, but if SWIG's output is portable
(i.e. it doesn't depend on the OS it is being used on), and it doesn't
need any files which are part of the SWIG installation, we could ship
the generated sources so that users don't have to install SWIG.

Unfortunately the latter condition doesn't seem to hold as several
languages have a support library which is linked in using flags from:
"swig -<LANGUAGE> -ldflags" (this includes PHP4, although missing out
these flags doesn't seem to stop the PHP4 bindings from working).

I've also noticed "swig -python" has a "-modern" switch which generates
cleaner, leaner, faster code requiring Python 2.2 and up.  I'm working
up a patch to the build system to turn this on for appropriate Python
versions (although we could ship two versions if we switched to shipping
the generated code).

Cheers,
    Olly




More information about the Xapian-devel mailing list