Kaydet (Commit) abfc4d83 authored tarafından Christian Heimes's avatar Christian Heimes

Fix fishy sizeof(Py_ssize_t *).

sizeof(Py_ssize_t *) == sizeof(Py_ssize_t) but it's not a portable assumption.
CID 486403
üst e91ad501
......@@ -1326,7 +1326,7 @@ PyCArrayType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
if (stgdict->format == NULL)
goto error;
stgdict->ndim = itemdict->ndim + 1;
stgdict->shape = PyMem_Malloc(sizeof(Py_ssize_t *) * stgdict->ndim);
stgdict->shape = PyMem_Malloc(sizeof(Py_ssize_t) * stgdict->ndim);
if (stgdict->shape == NULL)
goto error;
stgdict->shape[0] = length;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment