8000 BUG: Fix memloc to be unsigned and add debug info to test · numpy/numpy@09934b2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 09934b2

Browse files
committed
BUG: Fix memloc to be unsigned and add debug info to test
1 parent 63f90a8 commit 09934b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

numpy/core/src/multiarray/scalarapi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ scalar_value(PyObject *scalar, PyArray_Descr *descr)
35< 9600 code>35
{
3636
int type_num;
3737
int align;
38-
npy_intp memloc;
38+
uintptr_t memloc;
3939
if (descr == NULL) {
4040
descr = PyArray_DescrFromScalar(scalar);
4141
type_num = descr->type_num;
@@ -168,7 +168,7 @@ scalar_value(PyObject *scalar, PyArray_Descr *descr)
168168
* Use the alignment flag to figure out where the data begins
169169
* after a PyObject_HEAD
170170
*/
171-
memloc = (npy_intp)scalar;
171+
memloc = (uintptr_t)scalar;
172172
memloc += sizeof(PyObject);
173173
/* now round-up to the nearest alignment value */
174174
align = descr->alignment;

0 commit comments

Comments
 (0)
0