summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2016-03-12 00:26:49 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2016-03-12 00:26:49 +0000
commit539aca58a5ae10c26332190911919cf87796ebcd (patch)
tree3bbb105443b5a0bf7a12f0101fd46ab90928087c
parent7339de974dde92dbc9bb912e4f94091aee82f0ec (diff)
downloadswig-539aca58a5ae10c26332190911919cf87796ebcd.tar.gz
Php fix for enum value of '\0'
-rw-r--r--Source/Modules/php.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx
index fbece2715..cddf61aec 100644
--- a/Source/Modules/php.cxx
+++ b/Source/Modules/php.cxx
@@ -1904,7 +1904,7 @@ done:
enumvalue = GetChar(n, "enumvalueex");
}
- if (enumvalue) {
+ if (enumvalue && *Char(enumvalue)) {
// Check for a simple constant expression which is valid in PHP.
// If we find one, initialise the const member with it; otherwise
// we initialise it using the C/C++ wrapped constant.
@@ -1916,7 +1916,8 @@ done:
break;
}
}
- if (!*p) set_to = enumvalue;
+ if (!*p)
+ set_to = enumvalue;
}
if (wrapping_member_constant) {