diff options
author | Larry Hastings <larry@hastings.org> | 2015-02-26 05:58:48 -0800 |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-02-26 05:58:48 -0800 |
commit | 8c3ec536e924002dc3afe4ff92e32fe9ed82ebab (patch) | |
tree | f141eec287584ba9d58d32461e1a7d92b5466e91 /Modules/unicodedata.c | |
parent | e287746401398ee81c8e8a1513a5fe828eb32559 (diff) | |
parent | 7b2c3c6840052ea6f8b41253faf38b9e24f9a453 (diff) | |
download | cpython-git-8c3ec536e924002dc3afe4ff92e32fe9ed82ebab.tar.gz |
Merge 3.4.3 release engineering changes back into 3.4.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index ec70e7af9d..47d2937b81 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -556,7 +556,7 @@ nfd_nfkd(PyObject *self, PyObject *input, int k) /* Overallocate at most 10 characters. */ space = (isize > 10 ? 10 : isize) + isize; osize = space; - output = PyMem_Malloc(space * sizeof(Py_UCS4)); + output = PyMem_New(Py_UCS4, space); if (!output) { PyErr_NoMemory(); return NULL; @@ -703,7 +703,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k) /* We allocate a buffer for the output. If we find that we made no changes, we still return the NFD result. */ - output = PyMem_Malloc(len * sizeof(Py_UCS4)); + output = PyMem_New(Py_UCS4, len); if (!output) { PyErr_NoMemory(); Py_DECREF(result); |