diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 19:10:51 +0200 |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-10-04 19:10:51 +0200 |
commit | 2242522fde7b43e59be14abe828d3213a7b7aaaa (patch) | |
tree | c1c336c66f31ac0f1a3f29f4b465d0ef7fa13717 | |
parent | 7aec401966e15aa50fd41be201b8d68859ab7eed (diff) | |
download | cpython-git-2242522fde7b43e59be14abe828d3213a7b7aaaa.tar.gz |
Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9)
-rw-r--r-- | Objects/unicodeobject.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 886d0249c7..594623c0bc 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -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; |