Skip to content

Commit 295bba5

Browse files
committed
GH-115322: fix ctypes call_function audit hook on 32-bit platforms.
It was using a signed conversion to communicate the function id (pointer) value.
1 parent ccad61e commit 295bba5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_ctypes/callproc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,8 +1199,8 @@ PyObject *_ctypes_callproc(ctypes_state *st,
11991199
PyObject *retval = NULL;
12001200

12011201
// Both call_function and call_cdeclfunction call us:
1202-
if (PySys_Audit("ctypes.call_function", "nO",
1203-
(Py_ssize_t)pProc, argtuple) < 0) {
1202+
if (PySys_Audit("ctypes.call_function", "KO",
1203+
(unsigned long long)pProc, argtuple) < 0) {
12041204
return NULL;
12051205
}
12061206

0 commit comments

Comments
 (0)