gh-115391: Fix compiler warning in `Objects/longobject.c` (GH-115368)

This commit is contained in:
Kirill Podoprigora 2024-02-13 23:49:13 +03:00 committed by GitHub
parent 4deb70590e
commit 206f73dc5f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -1135,7 +1135,7 @@ PyLong_AsNativeBytes(PyObject* vv, void* buffer, Py_ssize_t n, int endianness)
if (n <= 0) { if (n <= 0) {
// nothing to do! // nothing to do!
} }
else if (n <= sizeof(cv.b)) { else if (n <= (Py_ssize_t)sizeof(cv.b)) {
#if PY_LITTLE_ENDIAN #if PY_LITTLE_ENDIAN
if (little_endian) { if (little_endian) {
memcpy(buffer, cv.b, n); memcpy(buffer, cv.b, n);