Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)

This commit is contained in:
Antoine Pitrou 2011-10-04 19:10:51 +02:00
parent 7aec401966
commit 2242522fde
1 changed files with 3 additions and 0 deletions

View 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;