mirror of
https://github.com/python/cpython.git
synced 2025-08-27 20:25:18 +00:00
Removed redundant casts to char *
.
Corresponding functions now accept `const char *` (issue #1772673).
This commit is contained in:
parent
131caba074
commit
20b39b27d9
10 changed files with 17 additions and 18 deletions
|
@ -727,7 +727,7 @@ resize_compact(PyObject *unicode, Py_ssize_t length)
|
|||
_Py_DEC_REFTOTAL;
|
||||
_Py_ForgetReference(unicode);
|
||||
|
||||
new_unicode = (PyObject *)PyObject_REALLOC((char *)unicode, new_size);
|
||||
new_unicode = (PyObject *)PyObject_REALLOC(unicode, new_size);
|
||||
if (new_unicode == NULL) {
|
||||
_Py_NewReference(unicode);
|
||||
PyErr_NoMemory();
|
||||
|
@ -3483,7 +3483,7 @@ mbstowcs_errorpos(const char *str, size_t len)
|
|||
memset(&mbs, 0, sizeof mbs);
|
||||
while (len)
|
||||
{
|
||||
converted = mbrtowc(&ch, (char*)str, len, &mbs);
|
||||
converted = mbrtowc(&ch, str, len, &mbs);
|
||||
if (converted == 0)
|
||||
/* Reached end of string */
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue