diff options
| author | njsmith <njs@pobox.com> | 2013-02-10 13:47:58 -0800 |
|---|---|---|
| committer | njsmith <njs@pobox.com> | 2013-02-10 13:47:58 -0800 |
| commit | 1ee888709af17b20a6ff97c9f6b3562e5ed93b77 (patch) | |
| tree | 518ead73f7b5ac07546c196f23e23868830201c3 /numpy | |
| parent | 3f6aaa38d327eb52961b84fe99e52f04e6776d33 (diff) | |
| parent | 92545427dfebaa680ee0f38649d12c1f1c655a7f (diff) | |
| download | numpy-1ee888709af17b20a6ff97c9f6b3562e5ed93b77.tar.gz | |
Merge pull request #2975 from bfroehle/tp_alloc
ENH: Use tp_basicsize, not NPY_SIZEOF_PYARRAYOBJECT, for allocation
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/src/multiarray/arrayobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/src/multiarray/arrayobject.c b/numpy/core/src/multiarray/arrayobject.c index 10b750cdb..b559d4aba 100644 --- a/numpy/core/src/multiarray/arrayobject.c +++ b/numpy/core/src/multiarray/arrayobject.c @@ -1655,7 +1655,7 @@ array_alloc(PyTypeObject *type, Py_ssize_t NPY_UNUSED(nitems)) { PyObject *obj; /* nitems will always be 0 */ - obj = (PyObject *)PyArray_malloc(NPY_SIZEOF_PYARRAYOBJECT); + obj = (PyObject *)PyArray_malloc(type->tp_basicsize); PyObject_Init(obj, type); return obj; } |
