From ea5be4e5083750f0aeb168a748e14ec6d809b3c0 Mon Sep 17 00:00:00 2001 From: Olly Betts Date: Wed, 14 Jan 2015 10:44:54 +1300 Subject: Fix PHP backend for default_args testcase --- Source/Modules/php.cxx | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/Source/Modules/php.cxx b/Source/Modules/php.cxx index 218d6250c..00dfb064e 100644 --- a/Source/Modules/php.cxx +++ b/Source/Modules/php.cxx @@ -1284,7 +1284,8 @@ public: case T_SCHAR: case T_SHORT: case T_INT: - case T_LONG: { + case T_LONG: + case T_LONGLONG: { char *p; errno = 0; long n = strtol(Char(value), &p, 0); @@ -1298,7 +1299,8 @@ public: case T_UCHAR: case T_USHORT: case T_UINT: - case T_ULONG: { + case T_ULONG: + case T_ULONGLONG: { char *p; errno = 0; unsigned int n = strtoul(Char(value), &p, 0); @@ -1310,7 +1312,8 @@ public: break; } case T_FLOAT: - case T_DOUBLE:{ + case T_DOUBLE: + case T_LONGDOUBLE: { char *p; errno = 0; /* FIXME: strtod is locale dependent... */ @@ -1329,13 +1332,6 @@ public: } break; } - case T_REFERENCE: - case T_RVALUE_REFERENCE: - case T_USER: - case T_ARRAY: - Clear(value); - Append(value, "?"); - break; case T_STRING: if (Len(value) < 2) { // How can a string (including "" be less than 2 characters?) @@ -1384,6 +1380,11 @@ public: } break; } + default: + /* Safe default */ + Clear(value); + Append(value, "?"); + break; } if (!arg_values[argno]) { -- cgit v1.2.1