diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-09-11 10:38:17 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-09-11 10:38:17 (GMT) |
commit | f9fdfa7c4e4b5cd02f5bc23a928037d644c8cdff (patch) | |
tree | b8717eb220ebf9cc47899d1baf187deac3071835 /Modules/socketmodule.c | |
parent | dddfffeda1ff8496258cd68e1e66b67a8632ad77 (diff) | |
parent | ec1a498a01da2b4df22413ff778529d84111c2ee (diff) | |
download | cpython-f9fdfa7c4e4b5cd02f5bc23a928037d644c8cdff.zip cpython-f9fdfa7c4e4b5cd02f5bc23a928037d644c8cdff.tar.gz cpython-f9fdfa7c4e4b5cd02f5bc23a928037d644c8cdff.tar.bz2 |
Merge 3.4
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index ee24907..d9c70f8 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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)); |