]> granicus.if.org Git - python/commitdiff
revert r71159 since it broke the build
authorBenjamin Peterson <benjamin@python.org>
Sat, 4 Apr 2009 16:05:51 +0000 (16:05 +0000)
committerBenjamin Peterson <benjamin@python.org>
Sat, 4 Apr 2009 16:05:51 +0000 (16:05 +0000)
Include/object.h
Misc/NEWS

index fb5376a2ed9796072a3d6ab48acc170f907ea972..cfca64f9ab6e58d4d368e741f9aacdc732936ade 100644 (file)
@@ -749,13 +749,11 @@ PyAPI_FUNC(void) _Py_AddToAllObjects(PyObject *, int force);
        ((PyObject*)(op))->ob_refcnt++)
 
 #define Py_DECREF(op)                                  \
-       do {                                            \
-           if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA   \
-               --((PyObject*)(op))->ob_refcnt != 0)    \
-                   _Py_CHECK_REFCNT(op)                \
-           else                                        \
-               _Py_Dealloc((PyObject *)(op))           \
-        } while (0)
+       if (_Py_DEC_REFTOTAL  _Py_REF_DEBUG_COMMA       \
+           --((PyObject*)(op))->ob_refcnt != 0)                \
+               _Py_CHECK_REFCNT(op)                    \
+       else                                            \
+               _Py_Dealloc((PyObject *)(op))
 
 /* Safely decref `op` and set `op` to NULL, especially useful in tp_clear
  * and tp_dealloc implementatons.
index f254bfd5d382e0a5059c51446a5b9a0693027104..db86b517b24fd1c59aa79076716d00113087759a 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -207,8 +207,6 @@ Core and Builtins
 - Issue #3845: In PyRun_SimpleFileExFlags avoid invalid memory access with
   short file names.
 
-- Py_DECREF: Add `do { ... } while (0)' to avoid compiler warnings.
-
 Library
 -------