From 4862ab7bf45f3de4a5365a3dc76fb6a4c727057d Mon Sep 17 00:00:00 2001 From: Tim Peters Date: Wed, 9 May 2001 08:43:21 +0000 Subject: Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to restore correct semantics. --- Objects/stringobject.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Objects/stringobject.c b/Objects/stringobject.c index 65a28cb..5df3fc2 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); } -- cgit v0.12