Skip to content

Commit 593d621

Browse files
committed
add COMPARE_OP_INT
1 parent 60220c0 commit 593d621

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Objects/longobject.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3633,6 +3633,7 @@ _PyLong_IsSmallInt(PyObject *self)
36333633
void
36343634
_PyLong_ExactDealloc(PyObject *self)
36353635
{
3636+
assert(PyLong_CheckExact(self));
36363637
if (_PyLong_IsCompact((PyLongObject *)self)) {
36373638
#ifndef Py_GIL_DISABLED
36383639
if (_PyLong_IsSmallInt(self)) {

Python/bytecodes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2477,9 +2477,9 @@ dummy_func(
24772477
Py_ssize_t iright = _PyLong_CompactValue((PyLongObject *)right_o);
24782478
// 2 if <, 4 if >, 8 if ==; this matches the low 4 bits of the oparg
24792479
int sign_ish = COMPARISON_BIT(ileft, iright);
2480-
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)PyObject_Free);
2480+
PyStackRef_CLOSE_SPECIALIZED(left, _PyLong_ExactDealloc);
24812481
DEAD(left);
2482-
PyStackRef_CLOSE_SPECIALIZED(right, (destructor)PyObject_Free);
2482+
PyStackRef_CLOSE_SPECIALIZED(right, _PyLong_ExactDealloc);
24832483
DEAD(right);
24842484
res = (sign_ish & oparg) ? PyStackRef_True : PyStackRef_False;
24852485
// It's always a bool, so we don't care about oparg & 16.

0 commit comments

Comments
 (0)