[3.10] Add more const modifiers. (GH-26691). (GH-26692)

(cherry picked from commit be8b631b7a)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
Serhiy Storchaka 2021-06-12 20:44:32 +03:00 committed by GitHub
parent b441e99d89
commit c43317d41e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 24 deletions

View file

@ -658,7 +658,7 @@ unicode_result_ready(PyObject *unicode)
if (length == 1) {
int kind = PyUnicode_KIND(unicode);
if (kind == PyUnicode_1BYTE_KIND) {
Py_UCS1 *data = PyUnicode_1BYTE_DATA(unicode);
const Py_UCS1 *data = PyUnicode_1BYTE_DATA(unicode);
Py_UCS1 ch = data[0];
struct _Py_unicode_state *state = get_unicode_state();
PyObject *latin1_char = state->latin1[ch];