Fixed wrong value returned by ParameterPy::GetUnsigned
This commit is contained in:
parent
15a4976c97
commit
2cb06c6f65
|
@ -276,8 +276,8 @@ Py::Object ParameterGrpPy::getUnsigned(const Py::Tuple& args)
|
||||||
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr,&UInt))
|
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr,&UInt))
|
||||||
throw Py::Exception();
|
throw Py::Exception();
|
||||||
#if PY_MAJOR_VERSION < 3
|
#if PY_MAJOR_VERSION < 3
|
||||||
int cropped = _cParamGrp->GetUnsigned(pstr,UInt) & INT_MAX;
|
PyObject* val = Py_BuildValue("I",_cParamGrp->GetUnsigned(pstr,UInt));
|
||||||
return Py::Int(cropped);
|
return Py::Int(val);
|
||||||
#else
|
#else
|
||||||
return Py::Long(_cParamGrp->GetUnsigned(pstr,UInt));
|
return Py::Long(_cParamGrp->GetUnsigned(pstr,UInt));
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user