gh-111140: Adds PyLong_AsNativeBytes and PyLong_FromNative[Unsigned]Bytes functions (GH-114886)

This commit is contained in:
Steve Dower 2024-02-12 20:13:13 +00:00 committed by GitHub
parent a82fbc13d0
commit 7861dfd26a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
14 changed files with 533 additions and 26 deletions

View file

@ -162,7 +162,7 @@ _pysqlite_long_as_int64(PyObject * py_val)
sqlite_int64 int64val;
if (_PyLong_AsByteArray((PyLongObject *)py_val,
(unsigned char *)&int64val, sizeof(int64val),
IS_LITTLE_ENDIAN, 1 /* signed */) >= 0) {
IS_LITTLE_ENDIAN, 1 /* signed */, 0) >= 0) {
return int64val;
}
}