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

afayolle at codespeak.net afayolle at codespeak.net
Fri Jul 7 12:21:37 CEST 2006


Author: afayolle
Date: Fri Jul  7 12:21:37 2006
New Revision: 29728

Modified:
   pypy/dist/pypy/translator/c/primitive.py
Log:
some fixes on for 64 bit platforms. Still some problems with stackless

Modified: pypy/dist/pypy/translator/c/primitive.py
==============================================================================
--- pypy/dist/pypy/translator/c/primitive.py	(original)
+++ pypy/dist/pypy/translator/c/primitive.py	Fri Jul  7 12:21:37 2006
@@ -122,12 +122,13 @@
         assert ob is not None
         return 'HIDE_POINTER(%s)'%db.get(ob)
 
-
+# On 64 bit machines, SignedLongLong and Signed are the same, so the
+# order matters, because we want the Signed implementation.
 PrimitiveName = {
-    Signed:   name_signed,
     SignedLongLong:   name_signedlonglong,
-    Unsigned: name_unsigned,
+    Signed:   name_signed,
     UnsignedLongLong: name_unsignedlonglong,
+    Unsigned: name_unsigned,
     Float:    name_float,
     Char:     name_char,
     UniChar:  name_unichar,
@@ -138,10 +139,10 @@
     }
 
 PrimitiveType = {
-    Signed:   'long @',
     SignedLongLong:   'long long @',
-    Unsigned: 'unsigned long @',
+    Signed:   'long @',
     UnsignedLongLong: 'unsigned long long @',
+    Unsigned: 'unsigned long @',
     Float:    'double @',
     Char:     'char @',
     UniChar:  'unsigned int @',
@@ -152,10 +153,10 @@
     }
 
 PrimitiveErrorValue = {
-    Signed:   '-1',
     SignedLongLong:   '-1LL',
-    Unsigned: '((unsigned) -1)',
+    Signed:   '-1',
     UnsignedLongLong: '((unsigned long long) -1)',
+    Unsigned: '((unsigned) -1)',
     Float:    '-1.0',
     Char:     '((char) -1)',
     UniChar:  '((unsigned) -1)',



More information about the Pypy-commit mailing list