Commit 4862ab7b authored by Tim Peters's avatar Tim Peters

Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to

restore correct semantics.
parent 9e897f41
...@@ -75,11 +75,13 @@ PyString_FromStringAndSize(const char *str, int size) ...@@ -75,11 +75,13 @@ PyString_FromStringAndSize(const char *str, int size)
if (size == 0) { if (size == 0) {
PyObject *t = (PyObject *)op; PyObject *t = (PyObject *)op;
PyString_InternInPlace(&t); PyString_InternInPlace(&t);
op = (PyStringObject *)t;
nullstring = op; nullstring = op;
Py_INCREF(op); Py_INCREF(op);
} else if (size == 1 && str != NULL) { } else if (size == 1 && str != NULL) {
PyObject *t = (PyObject *)op; PyObject *t = (PyObject *)op;
PyString_InternInPlace(&t); PyString_InternInPlace(&t);
op = (PyStringObject *)t;
characters[*str & UCHAR_MAX] = op; characters[*str & UCHAR_MAX] = op;
Py_INCREF(op); Py_INCREF(op);
} }
...@@ -131,11 +133,13 @@ PyString_FromString(const char *str) ...@@ -131,11 +133,13 @@ PyString_FromString(const char *str)
if (size == 0) { if (size == 0) {
PyObject *t = (PyObject *)op; PyObject *t = (PyObject *)op;
PyString_InternInPlace(&t); PyString_InternInPlace(&t);
op = (PyStringObject *)t;
nullstring = op; nullstring = op;
Py_INCREF(op); Py_INCREF(op);
} else if (size == 1) { } else if (size == 1) {
PyObject *t = (PyObject *)op; PyObject *t = (PyObject *)op;
PyString_InternInPlace(&t); PyString_InternInPlace(&t);
op = (PyStringObject *)t;
characters[*str & UCHAR_MAX] = op; characters[*str & UCHAR_MAX] = op;
Py_INCREF(op); Py_INCREF(op);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment