Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95264:491e2a6351bd
Date: 2018-11-01 07:10 +0200
http://bitbucket.org/pypy/pypy/changeset/491e2a6351bd/

Log:    str -> utf_w, unicode -> realunicode_w

diff --git a/TODO b/TODO
--- a/TODO
+++ b/TODO
@@ -9,4 +9,5 @@
 * revisit all places where we do utf8.decode('utf-8'), they should work 
directly with utf8
   - rutf8.utf8_encode_mbcs
   - unicodehelper.fsencode
-  - interp_posix.FileEncoder.as_unicode (used in win32)
+* convert all realunicode_w to unicode_w after we flush out all old uses of 
unicode_w
+* benchmark
diff --git a/pypy/interpreter/gateway.py b/pypy/interpreter/gateway.py
--- a/pypy/interpreter/gateway.py
+++ b/pypy/interpreter/gateway.py
@@ -576,8 +576,10 @@
     assert typ in (int, str, float, unicode, r_longlong, r_uint, r_ulonglong, 
bool)
     if typ is r_int is r_longlong:
         return 'gateway_r_longlong_w'
-    elif typ in (str, unicode):
-        return typ.__name__ + '_w'
+    elif typ is str:
+        return 'utf8_w'
+    elif typ is unicode:
+        return 'realunicode_w'
     elif typ is bool:
         # For argument clinic's "bool" specifier: accept any object, and
         # convert it to a boolean value.  If you don't want this
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to