[PHP7] Wrap bool constants as PHP booleans

Leave PHP5 wrapping them as integers as this change could cause
incompatibilities.

Fixes issue https://github.com/swig/swig/issues/686 noted by Nishant
Gupta.
This commit is contained in:
Olly Betts 2016-11-30 17:19:11 +13:00
commit c8a5f84cd1
6 changed files with 275 additions and 1 deletions

View file

@ -12,10 +12,12 @@
unsigned long,
unsigned char,
signed char,
bool,
enum SWIGTYPE
"SWIG_LONG_CONSTANT($symname, ($1_type)$value);";
%typemap(consttab) bool
"SWIG_BOOL_CONSTANT($symname, ($1_type)$value);";
%typemap(consttab) float,
double
"SWIG_DOUBLE_CONSTANT($symname, $value);";