diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_csv.c | 2 | ||||
-rw-r--r-- | Modules/_datetimemodule.c | 4 | ||||
-rw-r--r-- | Modules/_gestalt.c | 2 | ||||
-rw-r--r-- | Modules/_io/stringio.c | 2 | ||||
-rw-r--r-- | Modules/_io/textio.c | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/Modules/_csv.c b/Modules/_csv.c index c02ee38..443309c 100644 --- a/Modules/_csv.c +++ b/Modules/_csv.c @@ -207,7 +207,7 @@ _set_char(const char *name, Py_UCS4 *target, PyObject *src, Py_UCS4 dflt) *target = '\0'; if (src != Py_None) { Py_ssize_t len; - len = PyUnicode_GetSize(src); + len = PyUnicode_GetLength(src); if (len > 1) { PyErr_Format(PyExc_TypeError, "\"%s\" must be an 1-character string", diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 316e1d7..b384233 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -1080,7 +1080,7 @@ make_Zreplacement(PyObject *object, PyObject *tzinfoarg) PyObject *tzinfo = get_tzinfo_member(object); PyObject *Zreplacement = PyUnicode_FromStringAndSize(NULL, 0); _Py_IDENTIFIER(replace); - + if (Zreplacement == NULL) return NULL; if (tzinfo == Py_None || tzinfo == NULL) @@ -2673,7 +2673,7 @@ date_format(PyDateTime_Date *self, PyObject *args) return NULL; /* if the format is zero length, return str(self) */ - if (PyUnicode_GetSize(format) == 0) + if (PyUnicode_GetLength(format) == 0) return PyObject_Str((PyObject *)self); return _PyObject_CallMethodId((PyObject *)self, &PyId_strftime, "O", format); diff --git a/Modules/_gestalt.c b/Modules/_gestalt.c index a45780f..cd30683 100644 --- a/Modules/_gestalt.c +++ b/Modules/_gestalt.c @@ -33,7 +33,7 @@ static int convert_to_OSType(PyObject *v, OSType *pr) { uint32_t tmp; - if (!PyUnicode_Check(v) || PyUnicode_GetSize(v) != 4) { + if (!PyUnicode_Check(v) || PyUnicode_GetLength(v) != 4) { PyErr_SetString(PyExc_TypeError, "OSType arg must be string of 4 chars"); return 0; 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; } |