[Python-checkins] cpython (merge 3.3 -> 3.4): merge 3.3 (#23362)

benjamin.peterson python-checkins at python.org
Mon Mar 2 19:24:38 CET 2015


https://hg.python.org/cpython/rev/880906bbf792
changeset:   94833:880906bbf792
branch:      3.4
parent:      94828:90f960e79c9e
parent:      94832:21cd7f83e0aa
user:        Benjamin Peterson <benjamin at python.org>
date:        Mon Mar 02 13:23:41 2015 -0500
summary:
  merge 3.3 (#23362)

files:
  Objects/unicodeobject.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -8665,7 +8665,7 @@
     /* allocate enough for a simple 1:1 translation without
        replacements, if we need more, we'll resize */
     osize = size;
-    output = PyMem_Malloc(osize * sizeof(Py_UCS4));
+    output = PyMem_NEW(Py_UCS4, osize);
     opos = 0;
     if (output == NULL) {
         PyErr_NoMemory();

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list