[pypy-commit] pypy py3.5: fix for c-89 (visual 9) compilation

mattip pypy.commits at gmail.com
Wed Sep 27 15:31:25 EDT 2017


Author: Matti Picus <matti.picus at gmail.com>
Branch: py3.5
Changeset: r92484:611fac54ebfd
Date: 2017-09-23 23:51 +0300
http://bitbucket.org/pypy/pypy/changeset/611fac54ebfd/

Log:	fix for c-89 (visual 9) compilation

diff --git a/pypy/module/cpyext/test/test_memoryobject.py b/pypy/module/cpyext/test/test_memoryobject.py
--- a/pypy/module/cpyext/test/test_memoryobject.py
+++ b/pypy/module/cpyext/test/test_memoryobject.py
@@ -72,7 +72,7 @@
              """
              /* Create an approximation of the buffer for a 0d ndarray */
              Py_buffer buf;
-             PyObject *str = PyBytes_FromString("hello, world.");
+             PyObject *ret, *str = PyBytes_FromString("hello, world.");
              buf.buf = PyBytes_AsString(str);
              buf.obj = str;
              buf.readonly = 1;
@@ -80,7 +80,7 @@
              buf.itemsize = 13;
              buf.ndim = 0;
              buf.shape = NULL;
-             PyObject* ret = PyMemoryView_FromBuffer(&buf);
+             ret = PyMemoryView_FromBuffer(&buf);
              return ret;
             """)])
         result = module.create_view()


More information about the pypy-commit mailing list