[pypy-svn] r13826 - in pypy/dist/pypy/translator/c: . test
ac at codespeak.net
ac at codespeak.net
Fri Jun 24 18:34:22 CEST 2005
Author: ac
Date: Fri Jun 24 18:34:22 2005
New Revision: 13826
Modified:
pypy/dist/pypy/translator/c/primitive.py
pypy/dist/pypy/translator/c/test/test_typed.py
pypy/dist/pypy/translator/c/unichar_include.h
Log:
Initial (and crude) support for unicode characters in C. (arre, ale)
Modified: pypy/dist/pypy/translator/c/primitive.py
==============================================================================
--- pypy/dist/pypy/translator/c/primitive.py (original)
+++ pypy/dist/pypy/translator/c/primitive.py Fri Jun 24 18:34:22 2005
@@ -51,7 +51,7 @@
Unsigned: 'unsigned long @',
Float: 'double @',
Char: 'char @',
- UniChar: 'pypy_unichar @',
+ UniChar: 'unsigned @',
Bool: 'char @',
Void: 'void @',
}
@@ -61,7 +61,7 @@
Unsigned: '((unsigned) -1)',
Float: '-1.0',
Char: '((char) -1)',
- UniChar: '((pypy_unichar) -1)',
+ UniChar: '((unsigned) -1)',
Bool: '((char) -1)',
Void: '/* error */',
}
Modified: pypy/dist/pypy/translator/c/test/test_typed.py
==============================================================================
--- pypy/dist/pypy/translator/c/test/test_typed.py (original)
+++ pypy/dist/pypy/translator/c/test/test_typed.py Fri Jun 24 18:34:22 2005
@@ -170,7 +170,7 @@
res = fn(i, j)
assert res == fn(i, j)
- def xtest_unichr_eq(self):
+ def test_unichr_eq(self):
l = list(u'Hello world')
def f(i=int,j=int):
return l[i] == l[j]
@@ -180,7 +180,7 @@
res = fn(i,j)
assert res == f(i,j)
- def xtest_unichr_ne(self):
+ def test_unichr_ne(self):
l = list(u'Hello world')
def f(i=int,j=int):
return l[i] != l[j]
Modified: pypy/dist/pypy/translator/c/unichar_include.h
==============================================================================
--- pypy/dist/pypy/translator/c/unichar_include.h (original)
+++ pypy/dist/pypy/translator/c/unichar_include.h Fri Jun 24 18:34:22 2005
@@ -5,7 +5,7 @@
/*** binary operations ***/
-typedef unsigned pypy_unichar;
+/* typedef unsigned pypy_unichar;
*/
#define OP_UNICHAR_EQ(x,y,r,err) r = ((x) == (y));
#define OP_UNICHAR_NE(x,y,r,err) r = ((x) != (y));
More information about the Pypy-commit
mailing list