diff options
author | Travis Oliphant <oliphant@enthought.com> | 2008-02-27 00:51:51 +0000 |
---|---|---|
committer | Travis Oliphant <oliphant@enthought.com> | 2008-02-27 00:51:51 +0000 |
commit | bccc9d0c806afba2e03674f970e7b56d296de43a (patch) | |
tree | be39439e30e80832f3bedad4ce56b174b20b6584 /numpy/core/src/arrayobject.c | |
parent | fb61bf2421093cc034c7d0985c77648188a8b209 (diff) | |
download | numpy-bccc9d0c806afba2e03674f970e7b56d296de43a.tar.gz |
Don't use FAST moves on aligned flexible data-types to avoid bus errors on SPARC archiecture.
Diffstat (limited to 'numpy/core/src/arrayobject.c')
-rw-r--r-- | numpy/core/src/arrayobject.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/numpy/core/src/arrayobject.c b/numpy/core/src/arrayobject.c index 5b657ce63..edc26d050 100644 --- a/numpy/core/src/arrayobject.c +++ b/numpy/core/src/arrayobject.c @@ -758,7 +758,12 @@ _copy_from0d(PyArrayObject *dest, PyArrayObject *src, int usecopy, int swap) sptr = aligned; } else sptr = src->data; - if (PyArray_ISALIGNED(dest)) { + /* FIXME: This should check for a flag on the data-type + that states whether or not it is variable length. + Because the ISFLEXIBLE check is hard-coded to the + built-in data-types. + */ + if (PyArray_ISALIGNED(dest) && !PyArray_ISFLEXIBLE(dest)) { myfunc = _strided_byte_copy; } else if (usecopy) { |