Closed eisoku9618 closed 1 year ago
@eisoku9618 just in case, could you check if 2**63-2
works?
@cielavenir Thank you, it didn't work...
Please try PyLong_AsUnsignedLong
Here is my test summary
input number | result |
---|---|
-2**63 | ok |
-2**63-1 | OverflowError: can't convert negative value to unsigned long |
2**63-1 | ok |
2**63 | ok |
2**64-2 | ok |
2**64-1 | ok |
2**64 | OverflowError: long int too large to convert |
Thanks~
When we call
toRapidJSONValue
->PyLong_AsLong
viaGrab
for an interger which value is2**64-1
, I get the following error from CPythonfor my record: https://levelup.gitconnected.com/how-python-represents-integers-using-bignum-f8f0574d0d6b