[pypy-commit] pypy py3k: fix bad merge (yet again)

rlamy pypy.commits at gmail.com
Thu Jun 23 14:22:29 EDT 2016


Author: Ronan Lamy <ronan.lamy at gmail.com>
Branch: py3k
Changeset: r85363:425c51ee5fb7
Date: 2016-06-23 19:21 +0100
http://bitbucket.org/pypy/pypy/changeset/425c51ee5fb7/

Log:	fix bad merge (yet again)

diff --git a/pypy/module/cpyext/bytesobject.py b/pypy/module/cpyext/bytesobject.py
--- a/pypy/module/cpyext/bytesobject.py
+++ b/pypy/module/cpyext/bytesobject.py
@@ -79,7 +79,7 @@
     called.  Refcount of the result is 1.
     """
     typedescr = get_typedescr(space.w_bytes.layout.typedef)
-    py_obj = typedescr.allocate(space, space.w_bytes)
+    py_obj = typedescr.allocate(space, space.w_bytes, length)
     py_str = rffi.cast(PyBytesObject, py_obj)
     py_str.c_ob_shash = -1
     py_str.c_ob_sstate = rffi.cast(rffi.INT, 0) # SSTATE_NOT_INTERNED
diff --git a/pypy/module/cpyext/test/test_bytesobject.py b/pypy/module/cpyext/test/test_bytesobject.py
--- a/pypy/module/cpyext/test/test_bytesobject.py
+++ b/pypy/module/cpyext/test/test_bytesobject.py
@@ -32,7 +32,7 @@
                      result = 1;
                  }
                  #ifdef PYPY_VERSION
-                    expected_size = sizeof(void*)*7;
+                    expected_size = 48;
                  #elif defined Py_DEBUG
                     expected_size = 53;
                  #else


More information about the pypy-commit mailing list