another fix for long long

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5762 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-03-17 18:40:44 +00:00
commit 0015c8417e

View file

@ -141,7 +141,7 @@ SWIGSTATICINLINE(int)
SWIGSTATICINLINE(PyObject* )
SWIG_From_meth(long long)(long long value)
{
return (value > LONG_MAX) ?
return ((value < LONG_MIN) || (value > LONG_MAX)) ?
PyLong_FromLongLong(value)
: PyInt_FromLong(swig_numeric_cast(value,long));
}