mirror of https://github.com/swig/swig
Fix for compiling as C code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12245 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c7b4336a6c
commit
22dd2292ca
|
@ -311,8 +311,9 @@ SWIG_AsVal_dec(double)(SV *obj, double *val)
|
|||
const char *nptr = SvPV_nolen(obj);
|
||||
if (nptr) {
|
||||
char *endptr;
|
||||
double v;
|
||||
errno = 0;
|
||||
double v = strtod(nptr, &endptr);
|
||||
v = strtod(nptr, &endptr);
|
||||
if (errno == ERANGE) {
|
||||
errno = 0;
|
||||
return SWIG_OverflowError;
|
||||
|
|
Loading…
Reference in New Issue