]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Oct 2011 17:10:51 +0000 (19:10 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 4 Oct 2011 17:10:51 +0000 (19:10 +0200)
Objects/unicodeobject.c

index 886d0249c7f6476f656aa899d25e9b5a49f31483..594623c0bc5551cc995483c1af6dfeef3db2554d 100644 (file)
@@ -10201,6 +10201,9 @@ unicode_expandtabs(PyUnicodeObject *self, PyObject *args)
     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;