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

restore correct semantics.
This commit is contained in:
Tim Peters 2001-05-09 08:43:21 +00:00
parent 9e897f41db
commit 4862ab7bf4
1 changed files with 4 additions and 0 deletions

View 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);
}