Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to
restore correct semantics.
This commit is contained in:
parent
9e897f41db
commit
4862ab7bf4
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue