0
0
mirror of https://github.com/vim/vim.git synced 2025-08-26 20:03:41 -04:00

patch 9.1.1189: if_python: build error due to incompatible pointer types

Problem:  if_python: build error due to incompatible pointer types
Solution: cast pointer to PyObject* (oreo639)

Avoid build failure due to -Wincompatible-pointer-types becoming an error in
gcc 14.
When Py_LIMITED_API is < 0x030b0000, then the for Py_XDECREF must be PyObject*.
Vim targets Py_LIMITED_API = 0x03080000 (python 3.8).

closes: #16824

Signed-off-by: oreo639 <oreo6391@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
oreo639 2025-03-09 08:54:21 +01:00 committed by Christian Brabandt
parent 14da0fb2d8
commit 0a825bdde8
No known key found for this signature in database
GPG Key ID: F3F92DA383FDDE09
2 changed files with 3 additions and 1 deletions

View File

@ -5397,7 +5397,7 @@ RangeDestructor(PyObject *self_obj)
{ {
RangeObject *self = (RangeObject*)self_obj; RangeObject *self = (RangeObject*)self_obj;
PyObject_GC_UnTrack((void *)(self)); PyObject_GC_UnTrack((void *)(self));
Py_XDECREF(self->buf); Py_XDECREF(((PyObject *)(self->buf)));
PyObject_GC_Del((void *)(self)); PyObject_GC_Del((void *)(self));
} }

View File

@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
1189,
/**/ /**/
1188, 1188,
/**/ /**/