]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706)
authorKen Jin <kenjin@python.org>
Thu, 19 Jun 2025 11:54:21 +0000 (19:54 +0800)
committerGitHub <noreply@github.com>
Thu, 19 Jun 2025 11:54:21 +0000 (13:54 +0200)
Include/cpython/longintrepr.h

index 9f12298d4fcc37f90b3211450679c07ec576b5f4..19a57284e0edb123359d0f457cd1db6c1740a18b 100644 (file)
@@ -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