From 2242522fde7b43e59be14abe828d3213a7b7aaaa Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 4 Oct 2011 19:10:51 +0200 Subject: [PATCH] Add a necessary call to PyUnicode_READY() (followup to ab5086539ab9) --- Objects/unicodeobject.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 886d0249c7f..594623c0bc5 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;