[pypy-commit] pypy default: an attempt to fix translation

fijal pypy.commits at gmail.com
Fri Apr 1 02:42:20 EDT 2016


Author: fijal
Branch: 
Changeset: r83475:42bd4abc3cf8
Date: 2016-04-01 08:41 +0200
http://bitbucket.org/pypy/pypy/changeset/42bd4abc3cf8/

Log:	an attempt to fix translation

diff --git a/pypy/module/__pypy__/interp_magic.py b/pypy/module/__pypy__/interp_magic.py
--- a/pypy/module/__pypy__/interp_magic.py
+++ b/pypy/module/__pypy__/interp_magic.py
@@ -181,9 +181,10 @@
     elif space.is_w(space.type(w_obj), space.w_float):
         jit.promote(space.float_w(w_obj))
     elif space.is_w(space.type(w_obj), space.w_str):
-        jit.promote(space.str_w(w_obj))
+        jit.promote_string(space.unicode_w(w_obj))
     elif space.is_w(space.type(w_obj), space.w_unicode):
-        jit.promote(space.unicode_w(w_obj))
+        raise OperationError(space.w_TypeError, space.wrap(
+                             "promoting unicode unsupported"))
     else:
         jit.promote(w_obj)
     return w_obj


More information about the pypy-commit mailing list