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

Unified Diff: Modules/audioop.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
« no previous file with comments | « no previous file | Modules/_ctypes/_ctypes.c » ('j') | Modules/_ctypes/_ctypes.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Modules/audioop.c Thu Sep 22 11:43:46 2016 +0300
+++ b/Modules/audioop.c Fri Sep 23 22:25:22 2016 +0300
@@ -1365,9 +1365,10 @@
}
for (chan = 0; chan < nchannels; chan++) {
if (!PyArg_ParseTuple(PyTuple_GetItem(samps, chan),
- "ii:ratecv", &prev_i[chan],
- &cur_i[chan]))
+ "ii;audioop.ratecv: illegal state argument",
storchaka 2017/03/03 08:34:36 Seems other error messages don't contain the name
Oren Milman 2017/08/16 16:09:26 I agree.
+ &prev_i[chan], &cur_i[chan])) {
goto exit;
+ }
}
}
@@ -1638,7 +1639,9 @@
PyErr_SetString(PyExc_TypeError, "state must be a tuple or None");
return NULL;
}
- else if (!PyArg_ParseTuple(state, "ii", &valpred, &index)) {
+ else if (!PyArg_ParseTuple(state,
+ "ii;audioop.lin2adpcm: illegal state argument",
+ &valpred, &index)) {
return NULL;
}
else if (valpred >= 0x8000 || valpred < -0x8000 ||
@@ -1766,7 +1769,9 @@
PyErr_SetString(PyExc_TypeError, "state must be a tuple or None");
return NULL;
}
- else if (!PyArg_ParseTuple(state, "ii", &valpred, &index)) {
+ else if (!PyArg_ParseTuple(state,
+ "ii;audioop.adpcm2lin: illegal state argument",
+ &valpred, &index)) {
return NULL;
}
else if (valpred >= 0x8000 || valpred < -0x8000 ||
« no previous file with comments | « no previous file | Modules/_ctypes/_ctypes.c » ('j') | Modules/_ctypes/_ctypes.c » ('J')

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