gh-111995: Add getnameinfo extension flag (#111994)

Add getnameinfo extension NI_IDN flag.
This commit is contained in:
adder32 2023-11-15 02:00:24 +01:00 committed by GitHub
parent 62802b6228
commit fe9db901b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View file

@ -0,0 +1,2 @@
Added the ``NI_IDN`` constant to the :mod:`socket` module when present in C
at build time for use with :func:`socket.getnameinfo`.

View file

@ -8803,6 +8803,9 @@ socket_exec(PyObject *m)
#ifdef NI_DGRAM
ADD_INT_MACRO(m, NI_DGRAM);
#endif
#ifdef NI_IDN
ADD_INT_MACRO(m, NI_IDN);
#endif
/* shutdown() parameters */
#ifdef SHUT_RD