mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
This commit is contained in:
parent
67df285a33
commit
afe55bba33
50 changed files with 578 additions and 240 deletions
|
@ -18,11 +18,12 @@ static int
|
|||
check_matched(PyObject *obj, PyObject *arg)
|
||||
{
|
||||
PyObject *result;
|
||||
_Py_identifier(match);
|
||||
int rc;
|
||||
|
||||
if (obj == Py_None)
|
||||
return 1;
|
||||
result = PyObject_CallMethod(obj, "match", "O", arg);
|
||||
result = _PyObject_CallMethodId(obj, &PyId_match, "O", arg);
|
||||
if (result == NULL)
|
||||
return -1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue