diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2012-06-16 02:53:25 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2012-06-16 02:53:25 (GMT) |
commit | 8a8b3eaabe0a3cf2f4df1b23239dde33d5dd10c4 (patch) | |
tree | e95f50ec430277accba1de00e3cd582895cbfbbd /Objects | |
parent | 24e403bbeea07bdf1843403f5cef371bce715801 (diff) | |
download | cpython-8a8b3eaabe0a3cf2f4df1b23239dde33d5dd10c4.zip cpython-8a8b3eaabe0a3cf2f4df1b23239dde33d5dd10c4.tar.gz cpython-8a8b3eaabe0a3cf2f4df1b23239dde33d5dd10c4.tar.bz2 |
Fix a compiler warning in _copy_characters() and remove debug code
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index d5d83fd..cf9aec2 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -1156,7 +1156,7 @@ _copy_characters(PyObject *to, Py_ssize_t to_start, if (check_maxchar) { Py_UCS4 max_char; max_char = ucs1lib_find_max_char(from_data, - (char*)from_data + how_many); + (Py_UCS1*)from_data + how_many); if (max_char >= 128) return -1; } @@ -3860,11 +3860,6 @@ PyUnicode_AsUTF8(PyObject *unicode) return PyUnicode_AsUTF8AndSize(unicode, NULL); } -#ifdef Py_DEBUG -static int unicode_as_unicode_calls = 0; -#endif - - Py_UNICODE * PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size) { @@ -3888,10 +3883,6 @@ PyUnicode_AsUnicodeAndSize(PyObject *unicode, Py_ssize_t *size) assert(_PyUnicode_KIND(unicode) != 0); assert(PyUnicode_IS_READY(unicode)); -#ifdef Py_DEBUG - ++unicode_as_unicode_calls; -#endif - if (PyUnicode_KIND(unicode) == PyUnicode_4BYTE_KIND) { #if SIZEOF_WCHAR_T == 2 four_bytes = PyUnicode_4BYTE_DATA(unicode); |