In 32 bits, do not throw errors when DbU exceed 32 bits.

This commit is contained in:
Jean-Paul Chaput (acting Coriolis) 2017-02-08 18:24:13 +01:00
parent 3598c6d8f7
commit aaeeef0097
1 changed files with 5 additions and 5 deletions

View File

@ -136,11 +136,11 @@ namespace Isobar {
if (PyObject_IsInstance(object,(PyObject*)&PyInt_Type )) value = PyInt_AsLong ( object );
else if (PyObject_IsInstance(object,(PyObject*)&PyLong_Type)) value = PyLong_AsLongLong( object );
if (value > numeric_limits<int>::max()) {
throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%li"
, DbU::getValueString(value).c_str(), value
);
}
//if (value > numeric_limits<int>::max()) {
// throw Error( "PyAny_AsLong(): Suspiciously big int %s, db:%lli"
// , DbU::getValueString(value).c_str(), value
// );
//}
return value;
}