diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2012-11-06 19:03:28 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2012-11-06 19:03:28 -0700 |
commit | 82c0bb8a964c10b4c37665c5f2f6885fa46cd6a1 (patch) | |
tree | 1548b3878827b10c24f56c0c7e3e0b45db165262 | |
parent | 93be7c0ca93735faac3c9b03b6844a4f9ed90d71 (diff) | |
parent | e614443709ab49e4a5f2533b038e650f564d3d07 (diff) | |
download | numpy-82c0bb8a964c10b4c37665c5f2f6885fa46cd6a1.tar.gz |
Fixes that let PyArray_DATA and PyArray_BYTES be used as lvalues.
* pull-2709:
BUG: Remove pointer cast from the PyArray_DATA macro.
BUG: Remove pointer cast from the PyArray_BYTES macro.
-rw-r--r-- | numpy/core/include/numpy/ndarraytypes.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/include/numpy/ndarraytypes.h b/numpy/core/include/numpy/ndarraytypes.h index f7898753b..c84eb6277 100644 --- a/numpy/core/include/numpy/ndarraytypes.h +++ b/numpy/core/include/numpy/ndarraytypes.h @@ -1477,8 +1477,8 @@ PyArray_SETITEM(PyArrayObject *arr, char *itemptr, PyObject *v) /* These macros are deprecated as of NumPy 1.7. */ #define PyArray_NDIM(obj) (((PyArrayObject_fields *)(obj))->nd) -#define PyArray_BYTES(obj) ((char *)(((PyArrayObject_fields *)(obj))->data)) -#define PyArray_DATA(obj) ((void *)(((PyArrayObject_fields *)(obj))->data)) +#define PyArray_BYTES(obj) (((PyArrayObject_fields *)(obj))->data) +#define PyArray_DATA(obj) (((PyArrayObject_fields *)(obj))->data) #define PyArray_DIMS(obj) (((PyArrayObject_fields *)(obj))->dimensions) #define PyArray_STRIDES(obj) (((PyArrayObject_fields *)(obj))->strides) #define PyArray_DIM(obj,n) (PyArray_DIMS(obj)[n]) |