bpo-39943: Remove unused self from find_nfc_index() (GH-18973)

This commit is contained in:
Andy Lester 2020-03-17 11:38:12 -05:00 committed by GitHub
parent 61cb3d02b8
commit 982307b9cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -623,7 +623,7 @@ nfd_nfkd(PyObject *self, PyObject *input, int k)
} }
static int static int
find_nfc_index(PyObject *self, struct reindex* nfc, Py_UCS4 code) find_nfc_index(const struct reindex* nfc, Py_UCS4 code)
{ {
unsigned int index; unsigned int index;
for (index = 0; nfc[index].start; index++) { for (index = 0; nfc[index].start; index++) {
@ -709,7 +709,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k)
} }
/* code is still input[i] here */ /* code is still input[i] here */
f = find_nfc_index(self, nfc_first, code); f = find_nfc_index(nfc_first, code);
if (f == -1) { if (f == -1) {
output[o++] = code; output[o++] = code;
i++; i++;
@ -732,7 +732,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k)
continue; continue;
} }
} }
l = find_nfc_index(self, nfc_last, code1); l = find_nfc_index(nfc_last, code1);
/* i1 cannot be combined with i. If i1 /* i1 cannot be combined with i. If i1
is a starter, we don't need to look further. is a starter, we don't need to look further.
Otherwise, record the combining class. */ Otherwise, record the combining class. */
@ -757,7 +757,7 @@ nfc_nfkc(PyObject *self, PyObject *input, int k)
assert(cskipped < 20); assert(cskipped < 20);
skipped[cskipped++] = i1; skipped[cskipped++] = i1;
i1++; i1++;
f = find_nfc_index(self, nfc_first, output[o]); f = find_nfc_index(nfc_first, output[o]);
if (f == -1) if (f == -1)
break; break;
} }