]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to
authorTim Peters <tim.peters@gmail.com>
Wed, 9 May 2001 08:43:21 +0000 (08:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 9 May 2001 08:43:21 +0000 (08:43 +0000)
restore correct semantics.

Objects/stringobject.c

index 65a28cb6beb38c1da97e906d6dec352ffc540cef..5df3fc2dd2a461a2c73840ef8fbca686edcbb2e4 100644 (file)
@@ -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);
        }