Charlie Hull wrote:> Hi all,
>
> After the problems we've been having with PHP5 I posted to the PHP bug
> list and a suggestion was made:
> http://bugs.php.net/bug.php?id=40985&edit=2
>
> I added the following lines to php5/xapian_wrap.cc:
>
> PHP_MSHUTDOWN_FUNCTION(xapian)
> {
> /* shutdown section */
> #ifdef ZTS
> ts_free_id(xapian_globals_id);
> #endif
> return SUCCESS;
> }
>
> This seems to fix the problem! If we could get the bindings generator to
> do this that would be fantastic, as it means we can link with a binary
> version of PHP5 rather than having to hack and rebuild PHP itself.
Fortunately, swig has a way of adding code into the MSHUTDOWN function,
so I've updated the bindings accordingly - the generated code should now
contain the line you requested.
--
Richard