[pypy-svn] r44307 - pypy/dist/pypy/rpython/lltypesystem

fijal at codespeak.net fijal at codespeak.net
Sat Jun 16 16:17:28 CEST 2007


Author: fijal
Date: Sat Jun 16 16:17:27 2007
New Revision: 44307

Modified:
   pypy/dist/pypy/rpython/lltypesystem/rfficache.py
   pypy/dist/pypy/rpython/lltypesystem/typecache.py
Log:
Add newlines to created file, to please svn


Modified: pypy/dist/pypy/rpython/lltypesystem/rfficache.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/rfficache.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/rfficache.py	Sat Jun 16 16:17:27 2007
@@ -47,6 +47,10 @@
         TYPES.append(name)
 TYPES += ['long long', 'unsigned long long', 'size_t', 'mode_t']
 
+def newline_repr(d):
+    assert isinstance(d, dict)
+    return "{\n%s\n}" % ",\n".join(["%r:%r" % (k, v) for k, v in d.items()])
+
 def get_type_sizes(filename, platform_key=machine_key(), types=TYPES,
                    compiler_exe=None):
     try:
@@ -68,7 +72,7 @@
         platforms[platform_key] = value
         comment = "# this is automatically generated cache files for c types\n"
         py.path.local(filename).write(comment + 'platforms = ' +
-                                      repr(platforms) + "\n")
+                                      newline_repr(platforms) + "\n")
         return value
 
 from pypy.tool import autopath

Modified: pypy/dist/pypy/rpython/lltypesystem/typecache.py
==============================================================================
--- pypy/dist/pypy/rpython/lltypesystem/typecache.py	(original)
+++ pypy/dist/pypy/rpython/lltypesystem/typecache.py	Sat Jun 16 16:17:27 2007
@@ -1,2 +1,4 @@
 # this is automatically generated cache files for c types
-platforms = {('', ('32bit', 'ELF'), 'Linux'): {'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 32, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32}, ('i386', ('32bit', ''), 'Darwin'): {'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 16, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32}}
+platforms = {
+('', ('32bit', 'ELF'), 'Linux'):{'short': 16, 'int': 32, 'unsigned char': 8, 'long': 32, 'char': 8, 'unsigned short': 16, 'unsigned long': 32, 'long long': 64, 'mode_t': 32, 'unsigned long long': 64, 'size_t': 32, 'unsigned int': 32}
+}



More information about the Pypy-commit mailing list