[Xapian-discuss] Windows build files for PHP bindings now
available for 0.9.10
Olly Betts
olly at survex.com
Tue Apr 3 15:53:50 BST 2007
On Tue, Apr 03, 2007 at 03:34:07PM +0100, Charlie Hull wrote:
> Using the packaged bindings, we get a lot of errors of the form:
>
> error C2660: 'zend_register_internal_class_ex' : function does not take
> 3 arguments
>
> when building for PHP4. Adding the -noproxy flag to the Swig call seems
> to fix the problem.
Please don't do that - you'll create PHP4 bindings with a different
syntax to those available under UNIX!
I think it would be better to forget about PHP4 on Windows for now than
ship "-noproxy" bindings.
But I believe this is easy to fix. Can you try adding TSRMLS_CC after
the third parameter (which is always NULL I think) of each call to
zend_register_internal_class_ex? Don't add a comma between the NULL and
TSRMLS_CC - just a space (TSRMLS_CC expands to either `,<more parameters>'
or nothing thanks to a suitable #define in the zend headers).
If that fixes it, I'll check in the two line fix to SWIG SVN. It's
possible TSRMLS_CC is missing elsewhere - if you see similar errors
for other calls, just try adding it.
Linux distros universally seem to build with ZTS disabled (Debian
enabled it for a while a few years ago, but soon reverted the change) so
you don't see these problems there as TSRMLS_CC expands to nothing
anyway!
> I've been rebuilding using Swig 1.3.31 and everything does seem to work,
> but let me know if this is unwise!
It is for PHP5 (he says with his "SWIG PHP maintainer" hat on...) The
most obvious problem is that some of the Query constructor overloads
can't be used.
Cheers,
Olly
More information about the Xapian-discuss
mailing list