mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.1925: if_python: still undefined behaviour with function pointer
Problem: if_python: still undefined behaviour with function pointer Solution: fix remaining problems Fix remaining issues in the if_python code in casting incompatible function pointers leading to Clang 17 giving runtime errors during UBSAN. closes: #13140 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
This commit is contained in:
committed by
Christian Brabandt
parent
1926ae4184
commit
02c51b1dd8
@@ -1533,7 +1533,7 @@ OutputSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
return OutputSetattr((OutputObject *)(self), name, val);
|
||||
return OutputSetattr(self, name, val);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
@@ -1611,7 +1611,7 @@ BufferSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
return BufferSetattr((BufferObject *)(self), name, val);
|
||||
return BufferSetattr(self, name, val);
|
||||
}
|
||||
|
||||
//////////////////
|
||||
@@ -1837,7 +1837,7 @@ WindowSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
|
||||
return WindowSetattr((WindowObject *)(self), name, val);
|
||||
return WindowSetattr(self, name, val);
|
||||
}
|
||||
|
||||
// Tab page list object - Definitions
|
||||
@@ -1911,7 +1911,7 @@ DictionaryGetattro(PyObject *self, PyObject *nameobj)
|
||||
DictionarySetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
return DictionarySetattr((DictionaryObject *)(self), name, val);
|
||||
return DictionarySetattr(self, name, val);
|
||||
}
|
||||
|
||||
// List object - Definitions
|
||||
@@ -1931,7 +1931,7 @@ ListGetattro(PyObject *self, PyObject *nameobj)
|
||||
ListSetattro(PyObject *self, PyObject *nameobj, PyObject *val)
|
||||
{
|
||||
GET_ATTR_STRING(name, nameobj);
|
||||
return ListSetattr((ListObject *)(self), name, val);
|
||||
return ListSetattr(self, name, val);
|
||||
}
|
||||
|
||||
// Function object - Definitions
|
||||
|
Reference in New Issue
Block a user