diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 (GMT) |
commit | 18e165558b24d29e7e0ca501842b9236589b012a (patch) | |
tree | 841678b5dc1aff3aa48701fee33a6ba7be00a72b /Modules/audioop.c | |
parent | 44829297348d9121a03fc7df2fac557b583cc7fa (diff) | |
download | cpython-18e165558b24d29e7e0ca501842b9236589b012a.zip cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.gz cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.bz2 |
Merge ssize_t branch.
Diffstat (limited to 'Modules/audioop.c')
-rw-r--r-- | Modules/audioop.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/audioop.c b/Modules/audioop.c index 8d5a305..5e285f4 100644 --- a/Modules/audioop.c +++ b/Modules/audioop.c @@ -1020,7 +1020,9 @@ audioop_ratecv(PyObject *self, PyObject *args) cur_i[chan])); if (PyErr_Occurred()) goto exit; - len = ncp - PyString_AsString(str); + /* We have checked before that the length + * of the string fits into int. */ + len = (int)(ncp - PyString_AsString(str)); if (len == 0) { /*don't want to resize to zero length*/ rv = PyString_FromStringAndSize("", 0); |