Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:12.3
python-numpy
numpy-fd15162.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File numpy-fd15162.patch of Package python-numpy
Index: numpy-1.6.2/numpy/core/src/multiarray/methods.c =================================================================== --- numpy-1.6.2.orig/numpy/core/src/multiarray/methods.c +++ numpy-1.6.2/numpy/core/src/multiarray/methods.c @@ -1476,7 +1476,15 @@ array_setstate(PyArrayObject *self, PyOb if (!PyDataType_FLAGCHK(typecode, NPY_LIST_PICKLE)) { int swap=!PyArray_ISNOTSWAPPED(self); self->data = datastr; - if (!_IsAligned(self) || swap) { +#ifndef NPY_PY3K + /* Check that the string is not interned */ + if (!_IsAligned(self) || swap || PyString_CHECK_INTERNED(rawdata)) { +#else + /* Bytes should always be considered immutable, but we just grab the + * pointer if they are large, to save memory. */ + if (!_IsAligned(self) || swap || (len <= 1000)) { +#endif + intp num = PyArray_NBYTES(self); self->data = PyDataMem_NEW(num); if (self->data == NULL) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor