]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1716: Windows build with python 3.12 and clang fails v9.0.1716
authorZdenek Dohnal <zdohnal@redhat.com>
Tue, 15 Aug 2023 20:52:01 +0000 (22:52 +0200)
committerChristian Brabandt <cb@256bit.org>
Tue, 15 Aug 2023 20:52:01 +0000 (22:52 +0200)
Problem: Windows build with python 3.12 and clang fails
Solution: Remove the PyBool_Type function pointer for python 3.12

Clang on Win doesn't like non-static functions in static struct with
Python 3.12 - removing the new obfuscated function and protecting the
old PyBool function for older Pythons fixes the issue.

closes: #12800

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
src/if_python3.c
src/version.c

index 0a0d31e69811a2d4f32c88a52948c7546c797563..e4d4a90ed0ee29f79bceb8d581f9174f6596c316 100644 (file)
@@ -628,9 +628,8 @@ static struct
     {"PyStdPrinter_Type", (PYTHON_PROC*)&py3_PyStdPrinter_Type},
     {"PySlice_Type", (PYTHON_PROC*)&py3_PySlice_Type},
     {"PyFloat_Type", (PYTHON_PROC*)&py3_PyFloat_Type},
+# if PY_VERSION_HEX < 0x030c00b0
     {"PyBool_Type", (PYTHON_PROC*)&py3_PyBool_Type},
-# if PY_VERSION_HEX >= 0x030c00b0
-    {"PyLong_Type", (PYTHON_PROC*)&py3_PyLong_Type},
 # endif
     {"PyNumber_Check", (PYTHON_PROC*)&py3_PyNumber_Check},
     {"PyNumber_Long", (PYTHON_PROC*)&py3_PyNumber_Long},
index c759da9c8b4b7053ad4fd87b03783f5a3c2d0dc8..80bd77d6417fcaca3c1f0b39893eee7ebc9df073 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1716,
 /**/
     1715,
 /**/