From 0379683d6e4856d759fa4654d5e856468d3d18fb Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 14 Sep 2026 15:31:55 +0200 Subject: [PATCH 1/2] gh-140550: Fix PyABIInfo_VAR macro: avoid ";" Remove ";" from PyABIInfo_VAR macro definition, since "PyABIInfo_VAR(abi_info);" added two ";;" which is illegal in C++03. --- Include/modsupport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Include/modsupport.h b/Include/modsupport.h index cb47ad8cd2727f..504a19d341a78a 100644 --- a/Include/modsupport.h +++ b/Include/modsupport.h @@ -140,7 +140,7 @@ PyAPI_FUNC(int) PyABIInfo_Check(PyABIInfo *info, const char *module_name); ///////////////////////////////////////////////////////// #define PyABIInfo_VAR(NAME) \ - static PyABIInfo NAME = _PyABIInfo_DEFAULT; + static PyABIInfo NAME = _PyABIInfo_DEFAULT #undef _PyABIInfo_DEFAULT_STABLE #undef _PyABIInfo_DEFAULT_FT From 2f5caa04f9c9a9b7a671ef4529ce41eb1205b392 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 14 Sep 2026 18:07:44 +0200 Subject: [PATCH 2/2] Add NEWS entry --- .../next/C_API/2026-09-14-18-07-43.gh-issue-140550.fLVOGn.rst | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Misc/NEWS.d/next/C_API/2026-09-14-18-07-43.gh-issue-140550.fLVOGn.rst diff --git a/Misc/NEWS.d/next/C_API/2026-09-14-18-07-43.gh-issue-140550.fLVOGn.rst b/Misc/NEWS.d/next/C_API/2026-09-14-18-07-43.gh-issue-140550.fLVOGn.rst new file mode 100644 index 00000000000000..146ea1968a0816 --- /dev/null +++ b/Misc/NEWS.d/next/C_API/2026-09-14-18-07-43.gh-issue-140550.fLVOGn.rst @@ -0,0 +1,3 @@ +Fix the :c:macro:`PyABIInfo_VAR` macro: remove redundant ``;``. Before, +``PyABIInfo_VAR(abi_info);`` code added two ``;;`` which is illegal in C++03. +Patch by Victor Stinner.