[pypy-svn] r47797 - pypy/dist/pypy/translator/c

arigo at codespeak.net arigo at codespeak.net
Wed Oct 24 10:41:07 CEST 2007


Author: arigo
Date: Wed Oct 24 10:41:06 2007
New Revision: 47797

Modified:
   pypy/dist/pypy/translator/c/funcgen.py
Log:
Support for debug_print(boolean).


Modified: pypy/dist/pypy/translator/c/funcgen.py
==============================================================================
--- pypy/dist/pypy/translator/c/funcgen.py	(original)
+++ pypy/dist/pypy/translator/c/funcgen.py	Wed Oct 24 10:41:06 2007
@@ -688,6 +688,10 @@
                     format.append(arg.value.replace('%', '%%'))
                     continue
                 format.append('%c')
+            elif T == Bool:
+                format.append('%s')
+                argv.append('(%s) ? "True" : "False"' % self.expr(arg))
+                continue
             else:
                 raise Exception("don't know how to debug_print %r" % (T,))
             argv.append(self.expr(arg))



More information about the Pypy-commit mailing list