https://github.com/python/cpython/commit/1b969f6d577bc1480b708e6604f708ab740f8715
commit: 1b969f6d577bc1480b708e6604f708ab740f8715
branch: main
author: Ken Jin <[email protected]>
committer: encukou <[email protected]>
date: 2025-06-19T13:54:21+02:00
summary:

gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706)

files:
M Include/cpython/longintrepr.h

diff --git a/Include/cpython/longintrepr.h b/Include/cpython/longintrepr.h
index 9f12298d4fcc37..19a57284e0edb1 100644
--- a/Include/cpython/longintrepr.h
+++ b/Include/cpython/longintrepr.h
@@ -125,9 +125,9 @@ _PyLong_IsCompact(const PyLongObject* op) {
 }
 
 static inline int
-PyLong_CheckCompact(const PyObject *op)
+PyLong_CheckCompact(PyObject *op)
 {
-    return PyLong_CheckExact(op) && _PyLong_IsCompact((PyLongObject *)op);
+    return PyLong_CheckExact(op) && _PyLong_IsCompact((const PyLongObject 
*)op);
 }
 
 #define PyUnstable_Long_IsCompact _PyLong_IsCompact

_______________________________________________
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