From: Tim Peters Date: Wed, 9 May 2001 08:43:21 +0000 (+0000) Subject: Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to X-Git-Tag: v2.2a3~1875 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4862ab7bf45f3de4a5365a3dc76fb6a4c727057d;p=thirdparty%2FPython%2Fcpython.git Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to restore correct semantics. --- diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 65a28cb6beb3..5df3fc2dd2a4 100644 --- a/Objects/stringobject.c +++ b/Objects/stringobject.c @@ -75,11 +75,13 @@ PyString_FromStringAndSize(const char *str, int size) if (size == 0) { PyObject *t = (PyObject *)op; PyString_InternInPlace(&t); + op = (PyStringObject *)t; nullstring = op; Py_INCREF(op); } else if (size == 1 && str != NULL) { PyObject *t = (PyObject *)op; PyString_InternInPlace(&t); + op = (PyStringObject *)t; characters[*str & UCHAR_MAX] = op; Py_INCREF(op); } @@ -131,11 +133,13 @@ PyString_FromString(const char *str) if (size == 0) { PyObject *t = (PyObject *)op; PyString_InternInPlace(&t); + op = (PyStringObject *)t; nullstring = op; Py_INCREF(op); } else if (size == 1) { PyObject *t = (PyObject *)op; PyString_InternInPlace(&t); + op = (PyStringObject *)t; characters[*str & UCHAR_MAX] = op; Py_INCREF(op); }