more fixes for security and warnings

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7009 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-02-26 20:25:10 +00:00
commit 5b74ab97a7
10 changed files with 44 additions and 34 deletions

View file

@ -34,7 +34,7 @@ SWIGINTERN int
} else {
double d;
if (SWIG_AsVal(double)(o, &d)) {
if (val) *val = Constructor(d, 0);
if (val) *val = Constructor(d, 0.0);
return 1;
} else {
PyErr_Clear();
@ -73,7 +73,7 @@ SWIGINTERN int
double re;
if (SWIG_AsVal(double)(o, &re)) {
if (SWIG_CheckDoubleInRange(re, -FLT_MAX, FLT_MAX, errmsg)) {
if (val) *val = Constructor(SWIG_numeric_cast(re,float), 0);
if (val) *val = Constructor(SWIG_numeric_cast(re,float), 0.0);
return 1;
} else {
return 0;