Author: Carl Friedrich Bolz <cfb...@gmx.de> Branch: space-newtext Changeset: r88116:d07a5af67b43 Date: 2016-11-03 12:12 +0100 http://bitbucket.org/pypy/pypy/changeset/d07a5af67b43/
Log: termios diff --git a/pypy/module/imp/interp_imp.py b/pypy/module/imp/interp_imp.py --- a/pypy/module/imp/interp_imp.py +++ b/pypy/module/imp/interp_imp.py @@ -14,14 +14,14 @@ suffixes_w.append( space.newtuple([space.newtext(importing.get_so_extension(space)), space.newtext('rb'), - space.newtext(importing.C_EXTENSION)])) + space.newint(importing.C_EXTENSION)])) suffixes_w.extend([ space.newtuple([space.newtext('.py'), space.newtext('U'), - space.newtext(importing.PY_SOURCE)]), + space.newint(importing.PY_SOURCE)]), space.newtuple([space.newtext('.pyc'), space.newtext('rb'), - space.newtext(importing.PY_COMPILED)]), + space.newint(importing.PY_COMPILED)]), ]) return space.newlist(suffixes_w) diff --git a/pypy/module/termios/interp_termios.py b/pypy/module/termios/interp_termios.py --- a/pypy/module/termios/interp_termios.py +++ b/pypy/module/termios/interp_termios.py @@ -29,7 +29,7 @@ for w_c in space.unpackiterable(w_cc): if space.isinstance_w(w_c, space.w_int): ch = space.call_function(space.getattr(w_builtin, - space.wrap('chr')), w_c) + space.newtext('chr')), w_c) cc.append(space.str_w(ch)) else: cc.append(space.str_w(w_c)) @@ -48,12 +48,12 @@ except OSError as e: raise convert_error(space, e) iflag, oflag, cflag, lflag, ispeed, ospeed, cc = tup - l_w = [space.wrap(i) for i in [iflag, oflag, cflag, lflag, ispeed, ospeed]] + l_w = [space.newint(i) for i in [iflag, oflag, cflag, lflag, ispeed, ospeed]] # last one need to be chosen carefully - cc_w = [space.wrap(i) for i in cc] + cc_w = [space.newbytes(i) for i in cc] if lflag & rtermios.ICANON: - cc_w[rtermios.VMIN] = space.wrap(ord(cc[rtermios.VMIN][0])) - cc_w[rtermios.VTIME] = space.wrap(ord(cc[rtermios.VTIME][0])) + cc_w[rtermios.VMIN] = space.newint(ord(cc[rtermios.VMIN][0])) + cc_w[rtermios.VTIME] = space.newint(ord(cc[rtermios.VTIME][0])) w_cc = space.newlist(cc_w) l_w.append(w_cc) return space.newlist(l_w) _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit