Kaydet (Commit) e3e3701f authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix issue # 1037 (sort of).

üst 18c3ff88
......@@ -1080,8 +1080,14 @@ indenterror(struct tok_state *tok)
static int
verify_identifier(char *start, char *end)
{
PyObject *s = PyUnicode_DecodeUTF8(start, end-start, NULL);
int result = PyUnicode_IsIdentifier(s);
PyObject *s;
int result;
s = PyUnicode_DecodeUTF8(start, end-start, NULL);
if (s == NULL) {
PyErr_Clear();
return 0;
}
result = PyUnicode_IsIdentifier(s);
Py_DECREF(s);
return result;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment