[Python-checkins] cpython: Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)

antoine.pitrou python-checkins at python.org
Tue Oct 4 19:15:58 CEST 2011


http://hg.python.org/cpython/rev/e6cc71820bf3
changeset:   72668:e6cc71820bf3
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Tue Oct 04 19:10:51 2011 +0200
summary:
  Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)

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


diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -10201,6 +10201,9 @@
     if (!PyArg_ParseTuple(args, "|i:expandtabs", &tabsize))
         return NULL;
 
+    if (PyUnicode_READY(self) == -1)
+        return NULL;
+
     /* First pass: determine size of output string */
     src_len = PyUnicode_GET_LENGTH(self);
     i = j = line_pos = 0;

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


More information about the Python-checkins mailing list