[pypy-svn] r49042 - in pypy/branch/remove-extcompiler-rctypes/pypy/translator/c: . test

cfbolz at codespeak.net cfbolz at codespeak.net
Sat Nov 24 15:12:15 CET 2007


Author: cfbolz
Date: Sat Nov 24 15:12:14 2007
New Revision: 49042

Modified:
   pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/node.py
   pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_lltyped.py
Log:
fix error message that didn't work for tuples. fix test


Modified: pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/node.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/node.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/node.py	Sat Nov 24 15:12:14 2007
@@ -896,7 +896,7 @@
                  or value is py.magic.AssertionError)):
                 return 'PyExc_' + value.__name__
         raise Exception("don't know how to simply render py object: %r" %
-                        value)
+                        (value, ))
     
     def forward_declaration(self):
         return []

Modified: pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_lltyped.py
==============================================================================
--- pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_lltyped.py	(original)
+++ pypy/branch/remove-extcompiler-rctypes/pypy/translator/c/test/test_lltyped.py	Sat Nov 24 15:12:14 2007
@@ -453,11 +453,13 @@
         def f(n):
             result = ()
             for cls in classes:
-                values = [getmin(cls), getmax(cls)]
                 for OP in operators:
-                    for x in values:
-                        res1 = OP(x, n)
-                        result += (res1,)
+                    x = getmin(cls)
+                    res1 = OP(x, n)
+                    result = result + (res1,)
+                    x = getmax(cls)
+                    res1 = OP(x, n)
+                    result = result + (res1,)
             return result
 
         def assert_eq(a, b):



More information about the Pypy-commit mailing list