mirror of https://github.com/python/cpython
gh-115391: Fix compiler warning in `Objects/longobject.c` (GH-115368)
This commit is contained in:
parent
4deb70590e
commit
206f73dc5f
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue