diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 08:38:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2011-10-09 08:38:36 (GMT) |
commit | afe55bba33a20f87a58f940186359237064b428f (patch) | |
tree | 66d64a1518d79c3d0e90c0a1d0080cd88e887d99 /Modules/socketmodule.c | |
parent | 67df285a3389c7fdb8c7bd301314ac45e17f8074 (diff) | |
download | cpython-afe55bba33a20f87a58f940186359237064b428f.zip cpython-afe55bba33a20f87a58f940186359237064b428f.tar.gz cpython-afe55bba33a20f87a58f940186359237064b428f.tar.bz2 |
Add API for static strings, primarily good for identifiers.
Thanks to Konrad Schöbel and Jasper Schulz for helping with the mass-editing.
Diffstat (limited to 'Modules/socketmodule.c')
-rw-r--r-- | Modules/socketmodule.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index e64c960..6d0a44c 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -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)); |