patch 9.0.1716: Windows build with python 3.12 and clang fails

Commit: 
https://github.com/vim/vim/commit/15a0a0281a060fd5968ca2f3c80e750137106adb
Author: Zdenek Dohnal <[email protected]>
Date:   Tue Aug 15 22:52:01 2023 +0200

    patch 9.0.1716: Windows build with python 3.12 and clang fails
    
    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 <[email protected]>
    Co-authored-by: Zdenek Dohnal <[email protected]>

diff --git a/src/if_python3.c b/src/if_python3.c
index 0a0d31e69..e4d4a90ed 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -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},
diff --git a/src/version.c b/src/version.c
index c759da9c8..80bd77d64 100644
--- a/src/version.c
+++ b/src/version.c
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1716,
 /**/
     1715,
 /**/

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1qW194-003b33-Ib%40256bit.org.

Raspunde prin e-mail lui