[pypy-svn] r25409 - pypy/dist/pypy/translator/c/src

mwh at codespeak.net mwh at codespeak.net
Wed Apr 5 19:10:45 CEST 2006


Author: mwh
Date: Wed Apr  5 19:10:43 2006
New Revision: 25409

Modified:
   pypy/dist/pypy/translator/c/src/pyobj.h
Log:
fix semi-colon placement in the OP_LEN macro.


Modified: pypy/dist/pypy/translator/c/src/pyobj.h
==============================================================================
--- pypy/dist/pypy/translator/c/src/pyobj.h	(original)
+++ pypy/dist/pypy/translator/c/src/pyobj.h	Wed Apr  5 19:10:43 2006
@@ -25,12 +25,12 @@
 #define OP_IS_TRUE(x,r) op_bool(r,PyObject_IsTrue(x))
 #define OP_NONZERO(x,r) op_bool(r,PyObject_IsTrue(x))
 
-#define OP_LEN(x,r) { \
+#define OP_LEN(x,r) do { \
 		int _retval = PyObject_Size(x);  \
-		if (_retval < 0) { CFAIL() };    \
+		if (_retval < 0) { CFAIL(); }    \
                 else                             \
                     r = PyInt_FromLong(_retval); \
-	}
+	} while (0)
 #define OP_NEG(x,r)           if (!(r=PyNumber_Negative(x)))     CFAIL()
 #define OP_POS(x,r)           if (!(r=PyNumber_Positive(x)))     CFAIL()
 #define OP_INVERT(x,r)        if (!(r=PyNumber_Invert(x)))       CFAIL()



More information about the Pypy-commit mailing list