From: Nikita Sobolev Date: Wed, 25 Oct 2023 07:11:04 +0000 (+0300) Subject: gh-111253: Fix error checking in _socket module init (#111254) X-Git-Tag: v3.13.0a2~337 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3052c098ca2779c2d9ab9800dabe66d0efa01794;p=thirdparty%2FPython%2Fcpython.git gh-111253: Fix error checking in _socket module init (#111254) --- diff --git a/Misc/NEWS.d/next/Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst b/Misc/NEWS.d/next/Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst new file mode 100644 index 000000000000..e21a42605aea --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst @@ -0,0 +1 @@ +Add error checking during :mod:`!_socket` module init. diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 3d099d41d1e7..ddc18d845616 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7723,10 +7723,10 @@ socket_exec(PyObject *m) /* FreeBSD divert(4) */ #ifdef PF_DIVERT - PyModule_AddIntMacro(m, PF_DIVERT); + ADD_INT_MACRO(m, PF_DIVERT); #endif #ifdef AF_DIVERT - PyModule_AddIntMacro(m, AF_DIVERT); + ADD_INT_MACRO(m, AF_DIVERT); #endif #ifdef AF_PACKET