summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2007-05-05 14:26:59 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2007-05-05 14:26:59 (GMT)
commitce32db3ab5ca95fa6de99bf8f12285b1a736223a (patch)
tree01d1c3f9078ad7d04d20d61ba44aeacfadd49705 /Objects
parent071b9da1469e30306fc91d6e26d12c4a8b1f10f8 (diff)
downloadcpython-ce32db3ab5ca95fa6de99bf8f12285b1a736223a.zip
cpython-ce32db3ab5ca95fa6de99bf8f12285b1a736223a.tar.gz
cpython-ce32db3ab5ca95fa6de99bf8f12285b1a736223a.tar.bz2
Silence gcc warnings.
Use correct type for copy target pointer.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/unicodeobject.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 4599414..aed07ee 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -410,13 +410,13 @@ PyObject *PyUnicode_FromString(const char *u)
/* Single characters are shared when using this constructor */
if (size == 1) {
- unicode = unicode_latin1[*u];
+ unicode = unicode_latin1[(int)*u];
if (!unicode) {
unicode = _PyUnicode_New(1);
if (!unicode)
return NULL;
unicode->str[0] = *u;
- unicode_latin1[*u] = unicode;
+ unicode_latin1[(int)*u] = unicode;
}
Py_INCREF(unicode);
return (PyObject *)unicode;
@@ -429,8 +429,8 @@ PyObject *PyUnicode_FromString(const char *u)
/* Copy the Unicode data into the new object */
if (u != NULL) {
- char *p = unicode->str;
- while (*p++ = *u++)
+ Py_UNICODE *p = unicode->str;
+ while ((*p++ = *u++))
;
}