Commit ee03c669 authored by ussrhero's avatar ussrhero
Browse files

fixed python long to typedVar conversion

parent 11e38853
......@@ -51,7 +51,7 @@ public:
if (PyLong_Check(obj.ptr()))
{
if (_PyLong_Sign(obj.ptr()) >= 0)
if (_PyLong_NumBits(obj.ptr()) > 63)
{
if (_PyLong_NumBits(obj.ptr()) > 64)
throw pykd::OverflowException("int too big to convert");
......@@ -60,9 +60,6 @@ public:
}
else
{
if (_PyLong_NumBits(obj.ptr()) > 63)
throw pykd::OverflowException("int too big to convert");
var.setLongLong(PyLong_AsLongLong(obj.ptr()));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment