mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-20 03:23:23 +08:00
fixed python long to typedVar conversion
This commit is contained in:
parent
11e38853dc
commit
ee03c669ae
@ -51,7 +51,7 @@ public:
|
|||||||
|
|
||||||
if (PyLong_Check(obj.ptr()))
|
if (PyLong_Check(obj.ptr()))
|
||||||
{
|
{
|
||||||
if (_PyLong_Sign(obj.ptr()) >= 0)
|
if (_PyLong_NumBits(obj.ptr()) > 63)
|
||||||
{
|
{
|
||||||
if (_PyLong_NumBits(obj.ptr()) > 64)
|
if (_PyLong_NumBits(obj.ptr()) > 64)
|
||||||
throw pykd::OverflowException("int too big to convert");
|
throw pykd::OverflowException("int too big to convert");
|
||||||
@ -60,9 +60,6 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (_PyLong_NumBits(obj.ptr()) > 63)
|
|
||||||
throw pykd::OverflowException("int too big to convert");
|
|
||||||
|
|
||||||
var.setLongLong(PyLong_AsLongLong(obj.ptr()));
|
var.setLongLong(PyLong_AsLongLong(obj.ptr()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user