diff Objects/unicodeobject.c @ 72668:e6cc71820bf3

Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)
author Antoine Pitrou <solipsis@pitrou.net>
date Tue, 04 Oct 2011 19:10:51 +0200
parents 1b4f886dc9e2
children 981deff56707
line wrap: on
line diff
--- a/Objects/unicodeobject.c	Tue Oct 04 19:08:01 2011 +0200
+++ b/Objects/unicodeobject.c	Tue Oct 04 19:10:51 2011 +0200
@@ -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;