1. Keisuke Takahashi
  2. pypy


Michael Foord  committed cc1d6c1

(mfoord) change way unicode characters are iterated over in buffer constructor for sake of the annotator

  • Participants
  • Parent commits 755e4b7
  • Branches bytearray

Comments (0)

Files changed (1)

File pypy/interpreter/buffer.py

View file
  • Ignore whitespace
         # but not the new buffer interface (change in python  2.7)
         from pypy.rlib.rstruct.unichar import pack_unichar
         charlist = []
-        for unich in w_object._value:
+        for unich in space.unicode_w(w_object):
             pack_unichar(unich, charlist)
         from pypy.interpreter.buffer import StringBuffer
         w_buffer = space.wrap(StringBuffer(''.join(charlist)))