Skip to content

Commit 04f0385

Browse files
Fidget-SpinnerAgent-Hellboy
authored andcommitted
pythongh-135379: Add back const cast to _PyLong_IsCompact (pythonGH-135706)
1 parent 5fa22fc commit 04f0385

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)