diff options
author | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:11:52 (GMT) |
---|---|---|
committer | Christian Heimes <christian@cheimes.de> | 2013-07-20 12:11:52 (GMT) |
commit | abfc4d838aed12ca650cf764fc7ac2ae1d778036 (patch) | |
tree | bf6e884b51114ed29fc5b963df93bc4258d6864f /Modules | |
parent | e91ad501c55184f375518f058b6e0625d47de0b1 (diff) | |
download | cpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.zip cpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.tar.gz cpython-abfc4d838aed12ca650cf764fc7ac2ae1d778036.tar.bz2 |
Fix fishy sizeof(Py_ssize_t *).
sizeof(Py_ssize_t *) == sizeof(Py_ssize_t) but it's not a portable assumption.
CID 486403
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_ctypes/_ctypes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c index c195694..62a083b 100644 --- a/Modules/_ctypes/_ctypes.c +++ b/Modules/_ctypes/_ctypes.c @@ -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; |