From 5a706cf8c0284b80b7aad6b72858027c844091a5 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Sun, 2 Oct 2011 00:36:53 +0200 Subject: Fix usage of PyUnicode_READY() in PyUnicode_GetLength() --- Objects/unicodeobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 3ce845c..7215517 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; } -- cgit v0.12