Author: Matti Picus <matti.pi...@gmail.com>
Branch: more-cpyext
Changeset: r97431:3eae4033694d
Date: 2019-09-11 12:33 +0300
http://bitbucket.org/pypy/pypy/changeset/3eae4033694d/

Log:    change order for cpython compatibility, be more verbose in
        compilation

diff --git a/lib_pypy/_pypy_testcapi.py b/lib_pypy/_pypy_testcapi.py
--- a/lib_pypy/_pypy_testcapi.py
+++ b/lib_pypy/_pypy_testcapi.py
@@ -61,6 +61,8 @@
     assert output_dir is not None
 
     from distutils.ccompiler import new_compiler
+    from distutils import log
+    log.set_verbosity(3)
 
     compiler = new_compiler()
     compiler.output_dir = output_dir
@@ -72,7 +74,8 @@
         ccflags = ['-fPIC', '-Wimplicit-function-declaration']
     res = compiler.compile([os.path.join(thisdir, csource)],
                            include_dirs=[include_dir],
-                           extra_preargs=ccflags)
+                           extra_preargs=ccflags,
+                          )
     object_filename = res[0]
 
     # set link options
diff --git a/pypy/module/cpyext/parse/cpyext_object.h 
b/pypy/module/cpyext/parse/cpyext_object.h
--- a/pypy/module/cpyext/parse/cpyext_object.h
+++ b/pypy/module/cpyext/parse/cpyext_object.h
@@ -67,13 +67,12 @@
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets; /* alway NULL for app-level objects*/
+    void *internal; /* always NULL for app-level objects */
+
+    /* Only in PyPY, in CPython thes are allocated/deleted */
     unsigned char _format[Py_MAX_FMT];
     Py_ssize_t _strides[Py_MAX_NDIMS];
     Py_ssize_t _shape[Py_MAX_NDIMS];
-    /* static store for shape and strides of
-       mono-dimensional buffers. */
-    /* Py_ssize_t smalltable[2]; */
-    void *internal; /* always NULL for app-level objects */
 } Py_buffer;
 
 typedef int (*getbufferproc)(PyObject *, Py_buffer *, int);
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to