mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Merge 3.4
This commit is contained in:
commit
f9fdfa7c4e
2 changed files with 7 additions and 3 deletions
|
@ -5513,9 +5513,7 @@ socket_getaddrinfo(PyObject *self, PyObject *args, PyObject* kwargs)
|
|||
if (hobj == Py_None) {
|
||||
hptr = NULL;
|
||||
} else if (PyUnicode_Check(hobj)) {
|
||||
_Py_IDENTIFIER(encode);
|
||||
|
||||
idna = _PyObject_CallMethodId(hobj, &PyId_encode, "s", "idna");
|
||||
idna = PyUnicode_AsEncodedString(hobj, "idna", NULL);
|
||||
if (!idna)
|
||||
return NULL;
|
||||
assert(PyBytes_Check(idna));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue