Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1)

Unified Diff: Modules/_ctypes/_ctypes.c

Issue 28261: wrong error messages when using PyArg_ParseTuple to parse normal tuples
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
--- a/Modules/_ctypes/_ctypes.c Thu Sep 22 11:43:46 2016 +0300
+++ b/Modules/_ctypes/_ctypes.c Fri Sep 23 22:25:22 2016 +0300
@@ -3250,7 +3250,10 @@
/* Here ftuple is a borrowed reference */
return NULL;
- if (!PyArg_ParseTuple(ftuple, "O&O", _get_name, &name, &dll)) {
+ if (!PyArg_ParseTuple(ftuple,
+ "O&O;PyCFuncPtr.__new__: illegal function name and "
storchaka 2017/03/03 08:34:36 I think it would be better to omit PyCFuncPtr.__ne
Oren Milman 2017/08/16 16:09:26 I agree. to reproduce the bug: ctypes.CFUNCTYPE(N
+ "dll object sequence argument",
+ _get_name, &name, &dll)) {
Py_DECREF(ftuple);
return NULL;
}

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+