Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 41623:6bc156d3c00e
Silence gcc warnings.
Use correct type for copy target pointer.
| author | Walter Dörwald <walter@livinglogic.de> |
|---|---|
| date | Sat, 05 May 2007 14:26:59 +0000 |
| parents | 107aacb9c595 |
| children | e25dcd874b82 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Sat May 05 14:21:20 2007 +0000 +++ b/Objects/unicodeobject.c Sat May 05 14:26:59 2007 +0000 @@ -410,13 +410,13 @@ /* 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 @@ /* 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++)) ; }
