diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 01:49:52 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-11-21 01:49:52 (GMT) |
commit | 9e30aa52fd416e17b692c4f22e57191cdd6ec654 (patch) | |
tree | f3b1c85f5cdbb6a32ec8f309400e8d3e1c2bbfaf /Modules/_io | |
parent | f3ae6208c706bae89d86df44c7c3dcac1bdcd94d (diff) | |
download | cpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.zip cpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.gz cpython-9e30aa52fd416e17b692c4f22e57191cdd6ec654.tar.bz2 |
Fix misuse of PyUnicode_GET_SIZE() => PyUnicode_GET_LENGTH()
And PyUnicode_GetSize() => PyUnicode_GetLength()
Diffstat (limited to 'Modules/_io')
-rw-r--r-- | Modules/_io/stringio.c | 2 | ||||
-rw-r--r-- | Modules/_io/textio.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Modules/_io/stringio.c b/Modules/_io/stringio.c index 7749990..c4794c9 100644 --- a/Modules/_io/stringio.c +++ b/Modules/_io/stringio.c @@ -730,7 +730,7 @@ stringio_init(stringio *self, PyObject *args, PyObject *kwds) and copy it */ self->string_size = 0; if (value && value != Py_None) - value_len = PyUnicode_GetSize(value); + value_len = PyUnicode_GetLength(value); else value_len = 0; if (value_len > 0) { diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 91a3891..07dad3a 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -2144,7 +2144,7 @@ textiowrapper_seek(textio *self, PyObject *args) textiowrapper_set_decoded_chars(self, decoded); /* Skip chars_to_skip of the decoded characters. */ - if (PyUnicode_GetSize(self->decoded_chars) < cookie.chars_to_skip) { + if (PyUnicode_GetLength(self->decoded_chars) < cookie.chars_to_skip) { PyErr_SetString(PyExc_IOError, "can't restore logical file position"); goto fail; } @@ -2208,7 +2208,7 @@ textiowrapper_tell(textio *self, PyObject *args) goto fail; if (self->decoder == NULL || self->snapshot == NULL) { - assert (self->decoded_chars == NULL || PyUnicode_GetSize(self->decoded_chars) == 0); + assert (self->decoded_chars == NULL || PyUnicode_GetLength(self->decoded_chars) == 0); return posobj; } |