We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 90930e6 commit 933fc53Copy full SHA for 933fc53
Objects/unicodeobject.c
@@ -12209,20 +12209,15 @@ PyUnicode_IsIdentifier(PyObject *self)
12209
12210
int kind = 0;
12211
void *data = NULL;
12212
- wchar_t *wstr;
+ const wchar_t *wstr = NULL;
12213
+ Py_UCS4 ch;
12214
if (ready) {
12215
kind = PyUnicode_KIND(self);
12216
data = PyUnicode_DATA(self);
- }
12217
- else {
12218
- wstr = _PyUnicode_WSTR(self);
12219
12220
-
12221
- Py_UCS4 ch;
12222
- if (ready) {
12223
ch = PyUnicode_READ(kind, data, 0);
12224
}
12225
else {
+ wstr = _PyUnicode_WSTR(self);
12226
ch = wstr[0];
12227
12228
/* PEP 3131 says that the first character must be in
0 commit comments