Skip to content

Commit 328e0c1

Browse files
committed
avoid some problematic decrefs
1 parent e07c218 commit 328e0c1

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static inline void
4343
_Py_DECREF_INT(PyLongObject *op)
4444
{
4545
assert(PyLong_CheckExact(op));
46-
_Py_DECREF_SPECIALIZED((PyObject *)op, (destructor)_PyLong_ExactDealloc);
46+
_Py_DECREF_SPECIALIZED((PyObject *)op, (destructor)PyObject_Free); // needs to be converted to freelist?
4747
}
4848

4949
static inline int

Python/bytecodes.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ dummy_func(
516516
STAT_INC(BINARY_OP, hit);
517517
PyObject *res_o = _PyLong_Multiply((PyLongObject *)left_o, (PyLongObject *)right_o);
518518
PyStackRef_CLOSE_SPECIALIZED(right, (destructor)_PyLong_ExactDealloc);
519-
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)_PyLong_ExactDealloc);
519+
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)PyObject_Free); // needs to be converted to freelist
520520
INPUTS_DEAD();
521521
ERROR_IF(res_o == NULL, error);
522522
res = PyStackRef_FromPyObjectSteal(res_o);
@@ -529,7 +529,7 @@ dummy_func(
529529
STAT_INC(BINARY_OP, hit);
530530
PyObject *res_o = _PyLong_Add((PyLongObject *)left_o, (PyLongObject *)right_o);
531531
PyStackRef_CLOSE_SPECIALIZED(right, (destructor)_PyLong_ExactDealloc);
532-
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)_PyLong_ExactDealloc);
532+
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)PyObject_Free); // needs to be converted to freelist
533533
INPUTS_DEAD();
534534
ERROR_IF(res_o == NULL, error);
535535
res = PyStackRef_FromPyObjectSteal(res_o);
@@ -542,7 +542,7 @@ dummy_func(
542542
STAT_INC(BINARY_OP, hit);
543543
PyObject *res_o = _PyLong_Subtract((PyLongObject *)left_o, (PyLongObject *)right_o);
544544
PyStackRef_CLOSE_SPECIALIZED(right, (destructor)_PyLong_ExactDealloc);
545-
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)_PyLong_ExactDealloc);
545+
PyStackRef_CLOSE_SPECIALIZED(left, (destructor)PyObject_Free); // needs to be converted to freelist
546546
INPUTS_DEAD();
547547
ERROR_IF(res_o == NULL, error);
548548
res = PyStackRef_FromPyObjectSteal(res_o);
@@ -951,7 +951,7 @@ dummy_func(
951951
PyList_SET_ITEM(list, index, PyStackRef_AsPyObjectSteal(value));
952952
assert(old_value != NULL);
953953
Py_DECREF(old_value);
954-
PyStackRef_CLOSE_SPECIALIZED(sub_st, (destructor)_PyLong_ExactDealloc );
954+
PyStackRef_CLOSE_SPECIALIZED(sub_st, (destructor)_PyLong_ExactDealloc);
955955
DEAD(sub_st);
956956
PyStackRef_CLOSE(list_st);
957957
}

Python/executor_cases.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)