[Xapian-devel] PHP Latest

Sam Liddicott sam at liddicott.com
Thu Apr 20 08:53:09 BST 2006


Olly Betts wrote:
>
> Latest version:
>
> http://www.oligarchy.co.uk/xapian/patches/swig-php-gen-oo-wrappers7.patch
> http://www.oligarchy.co.uk/xapian/patches/xapian7.phps
> http://www.oligarchy.co.uk/xapian/patches/xapian_wrap7.cc
>   
The generated .cc had this in:

#define SWIG_PHP_Error(code,msg) ErrorCode() = code; ErrorMsg() = msg; 
SWIG_fail;

which looks dangerous if SWIG_PHP_ERROR is part of an if/else block.

Surely it should be in { } or even the:
do { } while (0)
trick

I don't know if that is ever used, it just stood out as looking highly 
dodgy.

Sam



More information about the Xapian-devel mailing list