Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1d529d1

Browse files
committed
Add a cast to the call to _Py_Dealloc in the expanded version of
Py_DECREF, to reduce the warnings when compiling with reference count debugging on. (There are still warnings for each call to _Py_NewReference -- too bad.)
1 parent 7f400be commit 1d529d1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Include/object.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ extern long _Py_RefTotal;
349349
if (--_Py_RefTotal, --(op)->ob_refcnt != 0) \
350350
; \
351351
else \
352-
_Py_Dealloc(op)
352+
_Py_Dealloc((PyObject *)(op))
353353
#else /* !Py_REF_DEBUG */
354354

355355
#ifdef COUNT_ALLOCS
@@ -363,7 +363,7 @@ extern long _Py_RefTotal;
363363
if (--(op)->ob_refcnt != 0) \
364364
; \
365365
else \
366-
_Py_Dealloc(op)
366+
_Py_Dealloc((PyObject *)(op))
367367
#endif /* !Py_REF_DEBUG */
368368

369369
/* Macros to use in case the object pointer may be NULL: */

0 commit comments

Comments
 (0)