]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.5168: cannot build with Python 3.11 v8.2.5168
authorZdenek Dohnal <zdohnal@redhat.com>
Mon, 27 Jun 2022 12:59:00 +0000 (13:59 +0100)
committerBram Moolenaar <Bram@vim.org>
Mon, 27 Jun 2022 12:59:00 +0000 (13:59 +0100)
Problem:    Cannot build with Python 3.11.
Solution:   Adjust define for _PyObject_TypeCheck. (Zdenek Dohnal,
            closes #10627)

src/if_python3.c
src/version.c

index 0b05857d5a3bad036af1543ddadf2e3d23b1bdfb..1de8fe8d2033bee8a11b09b051ff898804041c6b 100644 (file)
@@ -692,7 +692,12 @@ py3__PyObject_TypeCheck(PyObject *ob, PyTypeObject *type)
 {
     return Py_IS_TYPE(ob, type) || PyType_IsSubtype(Py_TYPE(ob), type);
 }
-#  define _PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t)
+#  if PY_VERSION_HEX >= 0x030b00b3
+#   undef PyObject_TypeCheck
+#   define PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t)
+#  else
+#   define _PyObject_TypeCheck(o,t) py3__PyObject_TypeCheck(o,t)
+#  endif
 # endif
 
 # ifdef MSWIN
index d9dba16a73b573f855fb73b2875520f0e1bee8c5..5ac1cb93d0a8a0dd20513aa9ce071f69b5c8b74e 100644 (file)
@@ -735,6 +735,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    5168,
 /**/
     5167,
 /**/