[pypy-svn] r73281 - pypy/branch/cpython-extension/pypy/module/cpyext/include

fijal at codespeak.net fijal at codespeak.net
Fri Apr 2 06:08:50 CEST 2010


Author: fijal
Date: Fri Apr  2 06:08:46 2010
New Revision: 73281

Modified:
   pypy/branch/cpython-extension/pypy/module/cpyext/include/object.h
Log:
Avoid double check for nullity


Modified: pypy/branch/cpython-extension/pypy/module/cpyext/include/object.h
==============================================================================
--- pypy/branch/cpython-extension/pypy/module/cpyext/include/object.h	(original)
+++ pypy/branch/cpython-extension/pypy/module/cpyext/include/object.h	Fri Apr  2 06:08:46 2010
@@ -39,8 +39,8 @@
 
 #define Py_INCREF(ob)		(Py_IncRef(ob))
 #define Py_DECREF(ob)		(Py_DecRef(ob))
-#define Py_XINCREF(op) do { if ((op) == NULL) ; else Py_INCREF(op); } while (0)
-#define Py_XDECREF(op) do { if ((op) == NULL) ; else Py_DECREF(op); } while (0)
+#define Py_XINCREF(ob)  (Py_IncRef(ob))
+#define Py_XDECREF(ob)  (Py_DecRef(ob))
 
 #define Py_REFCNT(ob)		(((PyObject*)(ob))->ob_refcnt)
 #define Py_TYPE(ob)		(((PyObject*)(ob))->ob_type)



More information about the Pypy-commit mailing list