[Xapian-discuss] Windows build files for PHP bindings
now available for 0.9.10
Charlie Hull
charlie at juggler.net
Tue Apr 3 16:48:28 BST 2007
Olly Betts wrote:
> 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.
Excellent, that fixes it. I'd tried something along these lines but
didn't get anywhere, which is why I ended up with -noproxy.
>
> 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!
Yep, ZTS is a pain! This is also where the problems with PHP5 unloading
resources comes from....
Charlie
More information about the Xapian-discuss
mailing list