##// END OF EJS Templates
mpatch: use Py_ssize_t for string length
Adrian Buehlmann -
r16758:9a8ab5c4 default
parent child Browse files
Show More
@@ -20,6 +20,7 b''
20 of the GNU General Public License, incorporated herein by reference.
20 of the GNU General Public License, incorporated herein by reference.
21 */
21 */
22
22
23 #define PY_SSIZE_T_CLEAN
23 #include <Python.h>
24 #include <Python.h>
24 #include <stdlib.h>
25 #include <stdlib.h>
25 #include <string.h>
26 #include <string.h>
@@ -355,7 +356,7 b' static PyObject *'
355 patchedsize(PyObject *self, PyObject *args)
356 patchedsize(PyObject *self, PyObject *args)
356 {
357 {
357 long orig, start, end, len, outlen = 0, last = 0;
358 long orig, start, end, len, outlen = 0, last = 0;
358 int patchlen;
359 Py_ssize_t patchlen;
359 char *bin, *binend, *data;
360 char *bin, *binend, *data;
360
361
361 if (!PyArg_ParseTuple(args, "ls#", &orig, &bin, &patchlen))
362 if (!PyArg_ParseTuple(args, "ls#", &orig, &bin, &patchlen))
General Comments 0
You need to be logged in to leave comments. Login now