[pypy-svn] pypy default: For completeness, "fix" also name_unichar(), even though

arigo commits-noreply at bitbucket.org
Thu Feb 24 15:24:53 CET 2011


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r42257:cb0805d8b7ac
Date: 2011-02-24 15:24 +0100
http://bitbucket.org/pypy/pypy/changeset/cb0805d8b7ac/

Log:	For completeness, "fix" also name_unichar(), even though it was
	probably not really broken.

diff --git a/pypy/translator/c/primitive.py b/pypy/translator/c/primitive.py
--- a/pypy/translator/c/primitive.py
+++ b/pypy/translator/c/primitive.py
@@ -130,7 +130,7 @@
 
 def name_unichar(value, db):
     assert type(value) is unicode and len(value) == 1
-    return '%d' % ord(value)
+    return '((wchar_t)%d)' % ord(value)
 
 def name_address(value, db):
     if value:


More information about the Pypy-commit mailing list