From: Ken Jin Date: Thu, 19 Jun 2025 11:54:21 +0000 (+0800) Subject: gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706) X-Git-Tag: v3.15.0a1~1248 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b969f6d577bc1480b708e6604f708ab740f8715;p=thirdparty%2FPython%2Fcpython.git gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706) --- diff --git a/Include/cpython/longintrepr.h b/Include/cpython/longintrepr.h index 9f12298d4fcc..19a57284e0ed 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