From 92cc30da0905bb416cdddbb7ab03c57a5092be1a Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 25 Oct 2023 10:11:04 +0300 Subject: [PATCH] gh-111253: Fix error checking in _socket module init (GH-111254) (cherry picked from commit 3052c098ca2779c2d9ab9800dabe66d0efa01794) Co-authored-by: Nikita Sobolev --- .../Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst | 1 + Modules/socketmodule.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Library/2023-10-24-12-20-46.gh-issue-111253.HFywSK.rst 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 00000000000000..e21a42605aeaf6 --- /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 62b0e67be15c49..de7229d2ced2f5 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -7703,10 +7703,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 pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy