Cast to (destructor) to fix compiler warnings (GH-91711)

This commit is contained in:
Dennis Sweeney 2022-04-20 11:15:45 -04:00 committed by GitHub
parent b8812c9ca3
commit d7d7e6c007
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 12 deletions

View File

@ -40,7 +40,7 @@ static inline void
_Py_DECREF_INT(PyLongObject *op)
{
assert(PyLong_CheckExact(op));
_Py_DECREF_SPECIALIZED((PyObject *)op, PyObject_Free);
_Py_DECREF_SPECIALIZED((PyObject *)op, (destructor)PyObject_Free);
}
static inline int

View File

@ -1977,8 +1977,8 @@ handle_eval_breaker:
STAT_INC(BINARY_OP, hit);
PyObject *prod = _PyLong_Multiply((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(prod);
_Py_DECREF_SPECIALIZED(right, PyObject_Free);
_Py_DECREF_SPECIALIZED(left, PyObject_Free);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
STACK_SHRINK(1);
if (prod == NULL) {
goto error;
@ -2017,8 +2017,8 @@ handle_eval_breaker:
STAT_INC(BINARY_OP, hit);
PyObject *sub = _PyLong_Subtract((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(sub);
_Py_DECREF_SPECIALIZED(right, PyObject_Free);
_Py_DECREF_SPECIALIZED(left, PyObject_Free);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
STACK_SHRINK(1);
if (sub == NULL) {
goto error;
@ -2132,8 +2132,8 @@ handle_eval_breaker:
STAT_INC(BINARY_OP, hit);
PyObject *sum = _PyLong_Add((PyLongObject *)left, (PyLongObject *)right);
SET_SECOND(sum);
_Py_DECREF_SPECIALIZED(right, PyObject_Free);
_Py_DECREF_SPECIALIZED(left, PyObject_Free);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
STACK_SHRINK(1);
if (sum == NULL) {
goto error;
@ -2192,7 +2192,7 @@ handle_eval_breaker:
assert(res != NULL);
Py_INCREF(res);
STACK_SHRINK(1);
_Py_DECREF_SPECIALIZED(sub, PyObject_Free);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
SET_TOP(res);
Py_DECREF(list);
JUMPBY(INLINE_CACHE_ENTRIES_BINARY_SUBSCR);
@ -2217,7 +2217,7 @@ handle_eval_breaker:
assert(res != NULL);
Py_INCREF(res);
STACK_SHRINK(1);
_Py_DECREF_SPECIALIZED(sub, PyObject_Free);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
SET_TOP(res);
Py_DECREF(tuple);
JUMPBY(INLINE_CACHE_ENTRIES_BINARY_SUBSCR);
@ -2359,7 +2359,7 @@ handle_eval_breaker:
STACK_SHRINK(3);
assert(old_value != NULL);
Py_DECREF(old_value);
_Py_DECREF_SPECIALIZED(sub, PyObject_Free);
_Py_DECREF_SPECIALIZED(sub, (destructor)PyObject_Free);
Py_DECREF(list);
JUMPBY(INLINE_CACHE_ENTRIES_STORE_SUBSCR);
NOTRACE_DISPATCH();
@ -3795,8 +3795,8 @@ handle_eval_breaker:
JUMPBY(INLINE_CACHE_ENTRIES_COMPARE_OP);
NEXTOPARG();
STACK_SHRINK(2);
_Py_DECREF_SPECIALIZED(left, PyObject_Free);
_Py_DECREF_SPECIALIZED(right, PyObject_Free);
_Py_DECREF_SPECIALIZED(left, (destructor)PyObject_Free);
_Py_DECREF_SPECIALIZED(right, (destructor)PyObject_Free);
assert(opcode == POP_JUMP_FORWARD_IF_FALSE ||
opcode == POP_JUMP_BACKWARD_IF_FALSE ||
opcode == POP_JUMP_FORWARD_IF_TRUE ||