summaryrefslogtreecommitdiffstats
path: root/Objects/stringobject.c
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-05-09 08:43:21 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-05-09 08:43:21 (GMT)
commit4862ab7bf45f3de4a5365a3dc76fb6a4c727057d (patch)
treecc6196badbdaf1db7346b047734975bd86d2e7b9 /Objects/stringobject.c
parent9e897f41db4b86e26fabd9f4c098b1d273ed4481 (diff)
downloadcpython-4862ab7bf45f3de4a5365a3dc76fb6a4c727057d.zip
cpython-4862ab7bf45f3de4a5365a3dc76fb6a4c727057d.tar.gz
cpython-4862ab7bf45f3de4a5365a3dc76fb6a4c727057d.tar.bz2
Sheesh -- repair the dodge around "cast isn't an lvalue" complaints to
restore correct semantics.
Diffstat (limited to 'Objects/stringobject.c')
-rw-r--r--Objects/stringobject.c4
1 files changed, 4 insertions, 0 deletions
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);
}