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 /Python/peephole.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 'Python/peephole.c')
-rw-r--r-- | Python/peephole.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/peephole.c b/Python/peephole.c index 4185462b34..c56c8fcc23 100644 --- a/Python/peephole.c +++ b/Python/peephole.c @@ -290,7 +290,7 @@ fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts, PyObject *v static unsigned int * markblocks(unsigned char *code, Py_ssize_t len) { - unsigned int *blocks = (unsigned int *)PyMem_Malloc(len*sizeof(int)); + unsigned int *blocks = PyMem_New(unsigned int, len); int i,j, opcode, blockcnt = 0; if (blocks == NULL) { @@ -398,7 +398,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names, goto exitUnchanged; /* Mapping to new jump targets after NOPs are removed */ - addrmap = (int *)PyMem_Malloc(codelen * sizeof(int)); + addrmap = PyMem_New(int, codelen); if (addrmap == NULL) { PyErr_NoMemory(); goto exitError; |