From: Victor Stinner Date: Sat, 1 Oct 2011 22:36:53 +0000 (+0200) Subject: Fix usage of PyUnicode_READY() in PyUnicode_GetLength() X-Git-Tag: v3.3.0a1~1400 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a706cf8c0284b80b7aad6b72858027c844091a5;p=thirdparty%2FPython%2Fcpython.git Fix usage of PyUnicode_READY() in PyUnicode_GetLength() --- diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3ce845c3af3a..7215517abacd 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -2838,7 +2838,7 @@ PyUnicode_GetSize(PyObject *unicode) Py_ssize_t PyUnicode_GetLength(PyObject *unicode) { - if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) != -1) { + if (!PyUnicode_Check(unicode) || PyUnicode_READY(unicode) == -1) { PyErr_BadArgument(); return -1; }