Skip to content

Commit 1b969f6

Browse files
gh-135379: Add back const cast to _PyLong_IsCompact (GH-135706)
1 parent 13efe3f commit 1b969f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Include/cpython/longintrepr.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,9 @@ _PyLong_IsCompact(const PyLongObject* op) {
125125
}
126126

127127
static inline int
128-
PyLong_CheckCompact(const PyObject *op)
128+
PyLong_CheckCompact(PyObject *op)
129129
{
130-
return PyLong_CheckExact(op) && _PyLong_IsCompact((PyLongObject *)op);
130+
return PyLong_CheckExact(op) && _PyLong_IsCompact((const PyLongObject *)op);
131131
}
132132

133133
#define PyUnstable_Long_IsCompact _PyLong_IsCompact

0 commit comments

Comments
 (0)