summaryrefslogtreecommitdiffstats
path: root/src/if_python3.c
diff options
context:
space:
mode:
authorYee Cheng Chin <ychin.git@gmail.com>2023-09-21 16:40:12 +0200
committerChristian Brabandt <cb@256bit.org>2023-09-21 16:40:12 +0200
commit02c51b1dd8e8b96e969ad7e408536fa208d90ac8 (patch)
tree51fe637c77dc56e376a8167ac1ec698848ea3bc6 /src/if_python3.c
parent1926ae41845c3b6e2045b29225365c8a2e4eb1da (diff)
patch 9.0.1925: if_python: still undefined behaviour with function pointerv9.0.1925
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>
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index e14185efb5..9d53cafc74 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -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