fix cast from double to long long
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@8458 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
01597d58c1
commit
5601aff69c
3 changed files with 11 additions and 5 deletions
|
|
@ -204,7 +204,7 @@ SWIG_AsVal_dec(ptrdiff_t)(SWIG_Object obj, ptrdiff_t *val)
|
|||
SWIGINTERNINLINE int
|
||||
SWIG_CanCastAsInteger(double *d, double min, double max) {
|
||||
double x = *d;
|
||||
if (min <= x && x <= max) {
|
||||
if ((min <= x && x <= max)) {
|
||||
double fx = floor(x);
|
||||
double rd = ((x - fx) < 0.5) ? fx : ceil(x); /* simple rint */
|
||||
if ((errno == EDOM) || (errno == ERANGE)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue