[php] Fix long long handling on 32 bit platforms

The typemaps for long long and unsigned long long didn't handle a
string input correctly, and long_long_runme.php had a flawed test
in this case.

Fixes #2155
This commit is contained in:
Olly Betts 2022-01-22 13:09:34 +13:00
commit 87c2e7d71a
2 changed files with 7 additions and 3 deletions

View file

@ -16,7 +16,7 @@
char * endptr;
errno = 0;
lvar = (t) strtoll(Z_STRVAL(invar), &endptr, 10);
if (*endptr && !errno) break;
if (*endptr == '\0' && !errno) break;
}
/* FALL THRU */
default:
@ -33,7 +33,7 @@
char * endptr;
errno = 0;
lvar = (t) strtoull(Z_STRVAL(invar), &endptr, 10);
if (*endptr && !errno) break;
if (*endptr == '\0' && !errno) break;
}
/* FALL THRU */
default: