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

ac at codespeak.net ac at codespeak.net
Sat Jun 25 13:16:35 CEST 2005


Author: ac
Date: Sat Jun 25 13:16:34 2005
New Revision: 13843

Modified:
   pypy/dist/pypy/translator/c/int_include.h
   pypy/dist/pypy/translator/c/primitive.py
Log:
Changed unicode characters to use CPython's Py_UCS4 instead of unsigned.

Modified: pypy/dist/pypy/translator/c/int_include.h
==============================================================================
--- pypy/dist/pypy/translator/c/int_include.h	(original)
+++ pypy/dist/pypy/translator/c/int_include.h	Sat Jun 25 13:16:34 2005
@@ -146,7 +146,7 @@
 #define OP_CAST_PTR_TO_INT(x,r,err)     r = (long)(x);    /* XXX */
 
 #define OP_CAST_UNICHAR_TO_INT(x,r,err)    r = (long)(x);
-#define OP_CAST_INT_TO_UNICHAR(x,r,err)    r = (unsigned)(x);
+#define OP_CAST_INT_TO_UNICHAR(x,r,err)    r = (Py_UCS4)(x);
 
 /* bool operations */
 

Modified: pypy/dist/pypy/translator/c/primitive.py
==============================================================================
--- pypy/dist/pypy/translator/c/primitive.py	(original)
+++ pypy/dist/pypy/translator/c/primitive.py	Sat Jun 25 13:16:34 2005
@@ -51,7 +51,7 @@
     Unsigned: 'unsigned long @',
     Float:    'double @',
     Char:     'char @',
-    UniChar:  'unsigned @',
+    UniChar:  'Py_UCS4 @',
     Bool:     'char @',
     Void:     'void @',
     }
@@ -61,7 +61,7 @@
     Unsigned: '((unsigned) -1)',
     Float:    '-1.0',
     Char:     '((char) -1)',
-    UniChar:  '((unsigned) -1)',
+    UniChar:  '((Py_UCS4) -1)',
     Bool:     '((char) -1)',
     Void:     '/* error */',
     }



More information about the Pypy-commit mailing list