[pypy-commit] pypy py3.5-marshal3: translation fixes
arigo
pypy.commits at gmail.com
Sun Aug 28 16:14:41 EDT 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5-marshal3
Changeset: r86658:6fbcade1c6d6
Date: 2016-08-28 22:13 +0200
http://bitbucket.org/pypy/pypy/changeset/6fbcade1c6d6/
Log: translation fixes
diff --git a/pypy/module/marshal/interp_marshal.py b/pypy/module/marshal/interp_marshal.py
--- a/pypy/module/marshal/interp_marshal.py
+++ b/pypy/module/marshal/interp_marshal.py
@@ -11,7 +11,8 @@
# objects, are supported. Version 3 of this protocol properly
# supports circular links and sharing. The previous version is called
# "2", like in Python 2.7, although it is not always compatible
-# between CPython 2.7 and CPython 3.4.
+# between CPython 2.7 and CPython 3.4. Version 4 adds small
+# optimizations in compactness.
#
# XXX: before py3k, there was logic to do efficiently dump()/load() on
# a file object. The corresponding logic is gone from CPython 3.x, so
diff --git a/pypy/objspace/std/marshal_impl.py b/pypy/objspace/std/marshal_impl.py
--- a/pypy/objspace/std/marshal_impl.py
+++ b/pypy/objspace/std/marshal_impl.py
@@ -413,7 +413,7 @@
varnames = _unmarshal_strlist(u)
freevars = _unmarshal_strlist(u)
cellvars = _unmarshal_strlist(u)
- filename = space.unicode_w(u.get_w_obj()).encode('utf-8')
+ filename = space.unicode0_w(u.get_w_obj()).encode('utf-8')
name = space.unicode_w(u.get_w_obj()).encode('utf-8')
firstlineno = u.get_int()
lnotab = space.bytes_w(u.get_w_obj())
@@ -460,7 +460,7 @@
else:
lng = u.get_lng()
s = u.get(lng)
- w_u = u.space.newunicode(s.decode('latin1'))
+ w_u = u.space.newunicode(s.decode('latin-1'))
if interned:
w_u = u.space.new_interned_w_str(w_u)
return w_u
More information about the pypy-commit
mailing list