[pypy-svn] r28882 - pypy/dist/pypy/translator/cli

antocuni at codespeak.net antocuni at codespeak.net
Fri Jun 16 16:21:28 CEST 2006


Author: antocuni
Date: Fri Jun 16 16:21:22 2006
New Revision: 28882

Modified:
   pypy/dist/pypy/translator/cli/record.py
Log:
Print parenthesis around the tuple when converting to string.



Modified: pypy/dist/pypy/translator/cli/record.py
==============================================================================
--- pypy/dist/pypy/translator/cli/record.py	(original)
+++ pypy/dist/pypy/translator/cli/record.py	Fri Jun 16 16:21:22 2006
@@ -68,7 +68,7 @@
                 return # it's not a tuple
 
         self.ilasm.begin_function('ToString', [], 'string', False, 'virtual', 'instance', 'default')
-        self.ilasm.opcode('ldstr', '""')
+        self.ilasm.opcode('ldstr', '"("')
         for i in xrange(len(self.record._fields)):
             f_name = 'item%d' % i
             FIELD_TYPE, f_default = self.record._fields[f_name]
@@ -79,5 +79,7 @@
             self.ilasm.call('string string::Concat(string, string)')
             self.ilasm.opcode('ldstr ", "')
             self.ilasm.call('string string::Concat(string, string)')
+        self.ilasm.opcode('ldstr ")"')
+        self.ilasm.call('string string::Concat(string, string)')            
         self.ilasm.opcode('ret')
         self.ilasm.end_function()



More information about the Pypy-commit mailing list