mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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
|
@ -4821,7 +4821,9 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
|
|||
if (hobj == Py_None) {
|
||||
hptr = NULL;
|
||||
} else if (PyUnicode_Check(hobj)) {
|
||||
idna = PyObject_CallMethod(hobj, "encode", "s", "idna");
|
||||
_Py_identifier(encode);
|
||||
|
||||
idna = _PyObject_CallMethodId(hobj, &PyId_encode, "s", "idna");
|
||||
if (!idna)
|
||||
return NULL;
|
||||
assert(PyBytes_Check(idna));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue