summaryrefslogtreecommitdiffstats
path: root/Modules/_ctypes
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-11-18 21:59:51 (GMT)
committerGitHub <noreply@github.com>2019-11-18 21:59:51 (GMT)
commitbec7015dcc421a68cde030c5e4ca8e28408ef52d (patch)
tree43743012a4469a42a589dfbb2b5f6dc712099560 /Modules/_ctypes
parente37767bee1f7f1940b30768d21bfe2ae68c20a5f (diff)
downloadcpython-bec7015dcc421a68cde030c5e4ca8e28408ef52d.zip
cpython-bec7015dcc421a68cde030c5e4ca8e28408ef52d.tar.gz
cpython-bec7015dcc421a68cde030c5e4ca8e28408ef52d.tar.bz2
bpo-38622: Ensure ctypes.PyObj_FromPtr audit event passes tuples as a single argument (GH-17243)
(cherry picked from commit dcf1f83de8678b09df5bd7d04ca5f4ef1cd02aca) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Modules/_ctypes')
-rw-r--r--Modules/_ctypes/callproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/callproc.c b/Modules/_ctypes/callproc.c
index 7fb570e..77492e6 100644
--- a/Modules/_ctypes/callproc.c
+++ b/Modules/_ctypes/callproc.c
@@ -1631,7 +1631,7 @@ addressof(PyObject *self, PyObject *obj)
"invalid type");
return NULL;
}
- if (PySys_Audit("ctypes.addressof", "O", obj) < 0) {
+ if (PySys_Audit("ctypes.addressof", "(O)", obj) < 0) {
return NULL;
}
return PyLong_FromVoidPtr(((CDataObject *)obj)->b_ptr);
@@ -1651,7 +1651,7 @@ My_PyObj_FromPtr(PyObject *self, PyObject *args)
if (!PyArg_ParseTuple(args, "O&:PyObj_FromPtr", converter, &ob)) {
return NULL;
}
- if (PySys_Audit("ctypes.PyObj_FromPtr", "O", ob) < 0) {
+ if (PySys_Audit("ctypes.PyObj_FromPtr", "(O)", ob) < 0) {
return NULL;
}
Py_INCREF(ob);