Patch 8.2.2995

4 views
Skip to first unread message

Bram Moolenaar

unread,
Jun 14, 2021, 9:09:13 AM6/14/21
to vim...@googlegroups.com

Patch 8.2.2995
Problem: Linker errors with dynamic Python 3.10.
Solution: Add a couple of library entries. (Zdenek Dohnal, closes #8381,
closes #8356)
Files: src/if_python3.c


*** ../vim-8.2.2994/src/if_python3.c 2020-12-25 13:52:33.537313154 +0100
--- src/if_python3.c 2021-06-14 15:02:52.108245092 +0200
***************
*** 184,189 ****
--- 184,192 ----
# ifndef PyMapping_Keys
# define PyMapping_Keys py3_PyMapping_Keys
# endif
+ # if PY_VERSION_HEX >= 0x030a00b2
+ # define PyIter_Check py3_PyIter_Check
+ # endif
# define PyIter_Next py3_PyIter_Next
# define PyObject_GetIter py3_PyObject_GetIter
# define PyObject_Repr py3_PyObject_Repr
***************
*** 358,363 ****
--- 361,369 ----
static int (*py3_PyDict_Next)(PyObject *, Py_ssize_t *, PyObject **, PyObject **);
static PyObject* (*py3_PyLong_FromLong)(long);
static PyObject* (*py3_PyDict_New)(void);
+ # if PY_VERSION_HEX >= 0x030a00b2
+ static int (*py3_PyIter_Check)(PyObject *o);
+ # endif
static PyObject* (*py3_PyIter_Next)(PyObject *);
static PyObject* (*py3_PyObject_GetIter)(PyObject *);
static PyObject* (*py3_PyObject_Repr)(PyObject *);
***************
*** 538,543 ****
--- 544,552 ----
{"PyDict_Next", (PYTHON_PROC*)&py3_PyDict_Next},
{"PyMapping_Check", (PYTHON_PROC*)&py3_PyMapping_Check},
{"PyMapping_Keys", (PYTHON_PROC*)&py3_PyMapping_Keys},
+ # if PY_VERSION_HEX >= 0x030a00b2
+ {"PyIter_Check", (PYTHON_PROC*)&py3_PyIter_Check},
+ # endif
{"PyIter_Next", (PYTHON_PROC*)&py3_PyIter_Next},
{"PyObject_GetIter", (PYTHON_PROC*)&py3_PyObject_GetIter},
{"PyObject_Repr", (PYTHON_PROC*)&py3_PyObject_Repr},
***************
*** 671,676 ****
--- 680,694 ----
# define PyType_HasFeature(t,f) py3_PyType_HasFeature(t,f)
# endif

+ # if PY_VERSION_HEX >= 0x030a00b2
+ static inline int
+ 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)
+ # endif
+
# ifdef MSWIN
/*
* Look up the library "libname" using the InstallPath registry key.
*** ../vim-8.2.2994/src/version.c 2021-06-13 21:52:42.525260056 +0200
--- src/version.c 2021-06-14 15:02:52.112245079 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2995,
/**/

--
Lower life forms have more fun!

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages