Commit 008e1f62 authored by Robert Bradshaw's avatar Robert Bradshaw

Arrays use unamed fields, require non-standard (C11) extension.

parent 3bd45ec2
......@@ -14,8 +14,6 @@
#ifndef _ARRAYARRAY_H
#define _ARRAYARRAY_H
#include <Python.h>
struct arrayobject; /* Forward */
/* All possible arraydescr values are defined in the vector "descriptors"
......@@ -60,10 +58,10 @@ typedef struct arrayobject {
struct arraydescr *ob_descr;
#if PY_VERSION_HEX >= 0x02040000
PyObject *weakreflist; /* List of weak references */
#endif
#if PY_VERSION_HEX >= 0x03000000
int ob_exports; /* Number of exported buffers */
#endif
#endif
} arrayobject;
......@@ -73,7 +71,7 @@ typedef struct arrayobject {
* fast creation of a new array
*/
inline PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
struct arraydescr *descr) {
arrayobject *op;
size_t nbytes;
......
......@@ -84,8 +84,8 @@ def update_numpy_extension(ext):
ext.include_dirs.append(numpy.get_include())
def update_pyarray_extension(ext):
ext.include_dirs.append(
os.path.join(os.path.dirname(DISTDIR), "Cython/Includes/cpython"))
# See http://gcc.gnu.org/onlinedocs/gcc/Unnamed-Fields.html#Unnamed-Fields
ext.extra_compile_args.append('-fms-extensions')
def update_openmp_extension(ext):
ext.openmp = True
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment