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
1 changed files with 2 additions and 1 deletions
|
|
@ -311,8 +311,9 @@ SWIG_AsVal_dec(double)(SV *obj, double *val)
|
||||||
const char *nptr = SvPV_nolen(obj);
|
const char *nptr = SvPV_nolen(obj);
|
||||||
if (nptr) {
|
if (nptr) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
|
double v;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
double v = strtod(nptr, &endptr);
|
v = strtod(nptr, &endptr);
|
||||||
if (errno == ERANGE) {
|
if (errno == ERANGE) {
|
||||||
errno = 0;
|
errno = 0;
|
||||||
return SWIG_OverflowError;
|
return SWIG_OverflowError;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue