From bccc9d0c806afba2e03674f970e7b56d296de43a Mon Sep 17 00:00:00 2001 From: Travis Oliphant Date: Wed, 27 Feb 2008 00:51:51 +0000 Subject: Don't use FAST moves on aligned flexible data-types to avoid bus errors on SPARC archiecture. --- numpy/core/src/arrayobject.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'numpy/core/src/arrayobject.c') 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) { -- cgit v1.2.1