]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-111253: Fix error checking in _socket module init (#111254)
authorNikita Sobolev <mail@sobolevn.me>
Wed, 25 Oct 2023 07:11:04 +0000 (10:11 +0300)
committerGitHub <noreply@github.com>
Wed, 25 Oct 2023 07:11:04 +0000 (07:11 +0000)
Misc/NEWS.d/next/Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst [new file with mode: 0644]
Modules/socketmodule.c

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 (file)
index 0000000..e21a426
--- /dev/null
@@ -0,0 +1 @@
+Add error checking during :mod:`!_socket` module init.
index 3d099d41d1e7617a3a02a02c789f9af65533a816..ddc18d845616fad53c66c2ec40c069ee86ff2bae 100644 (file)
@@ -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