Skip to content

Commit

Permalink
Add a cast to the call to _Py_Dealloc in the expanded version of
Browse files Browse the repository at this point in the history
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.)
  • Loading branch information
gvanrossum committed Aug 5, 1997
1 parent 7f400be commit 1d529d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ extern long _Py_RefTotal;
if (--_Py_RefTotal, --(op)->ob_refcnt != 0) \
; \
else \
_Py_Dealloc(op)
_Py_Dealloc((PyObject *)(op))
#else /* !Py_REF_DEBUG */

#ifdef COUNT_ALLOCS
Expand All @@ -363,7 +363,7 @@ extern long _Py_RefTotal;
if (--(op)->ob_refcnt != 0) \
; \
else \
_Py_Dealloc(op)
_Py_Dealloc((PyObject *)(op))
#endif /* !Py_REF_DEBUG */

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

0 comments on commit 1d529d1

Please sign in to comment.