https://github.com/python/cpython/commit/206f73dc5f1b4c3c81119808aa7fd9038661cf90
commit: 206f73dc5f1b4c3c81119808aa7fd9038661cf90
branch: main
author: Kirill Podoprigora <[email protected]>
committer: zooba <[email protected]>
date: 2024-02-13T20:49:13Z
summary:

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

files:
M Objects/longobject.c

diff --git a/Objects/longobject.c b/Objects/longobject.c
index 932111f58425f2..fe782983334323 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -1135,7 +1135,7 @@ PyLong_AsNativeBytes(PyObject* vv, void* buffer, 
Py_ssize_t n, int endianness)
         if (n <= 0) {
             // nothing to do!
         }
-        else if (n <= sizeof(cv.b)) {
+        else if (n <= (Py_ssize_t)sizeof(cv.b)) {
 #if PY_LITTLE_ENDIAN
             if (little_endian) {
                 memcpy(buffer, cv.b, n);

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to