[pypy-commit] pypy space-newtext: fix two typos in the array module

cfbolz pypy.commits at gmail.com
Tue Nov 15 08:50:21 EST 2016


Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: space-newtext
Changeset: r88387:0292533aef1d
Date: 2016-11-15 14:49 +0100
http://bitbucket.org/pypy/pypy/changeset/0292533aef1d/

Log:	fix two typos in the array module

diff --git a/pypy/module/array/interp_array.py b/pypy/module/array/interp_array.py
--- a/pypy/module/array/interp_array.py
+++ b/pypy/module/array/interp_array.py
@@ -57,7 +57,7 @@
 
 
 def descr_typecode(space, self):
-    return space.newint(self.typecode)
+    return space.newtext(self.typecode)
 
 arr_eq_driver = jit.JitDriver(name='array_eq_driver', greens=['comp_func'],
                               reds='auto')
@@ -272,7 +272,7 @@
             elems = max(0, len(item) - (len(item) % self.itemsize))
             if n != 0:
                 item = item[0:elems]
-            self.descr_fromstring(space, space.newint(item))
+            self.descr_fromstring(space, space.newbytes(item))
             raise oefmt(space.w_EOFError, "not enough items in file")
         self.descr_fromstring(space, w_item)
 


More information about the pypy-commit mailing list