Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/diffhelpers.c @ 16695:0a0933d3d59c
diffhelpers: use Py_ssize_t in testhunk()
Eliminates
mercurial/diffhelpers.c(143) : warning C4244: '=' : conversion from
'Py_ssize_t' to 'int', possible loss of data
mercurial/diffhelpers.c(144) : warning C4244: '=' : conversion from
'Py_ssize_t' to 'int', possible loss of data
when compiling for Windows x64 target using the Microsoft compiler.
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sat, 12 May 2012 14:00:51 +0200 |
parents | 797b76205408 |
children | c8e7fa41bfc5 |
comparison
equal
deleted
inserted
replaced
16694:797b76205408 | 16695:0a0933d3d59c |
---|---|
132 testhunk(PyObject *self, PyObject *args) | 132 testhunk(PyObject *self, PyObject *args) |
133 { | 133 { |
134 | 134 |
135 PyObject *a, *b; | 135 PyObject *a, *b; |
136 long bstart; | 136 long bstart; |
137 int alen, blen; | 137 Py_ssize_t alen, blen; |
138 int i; | 138 Py_ssize_t i; |
139 char *sa, *sb; | 139 char *sa, *sb; |
140 | 140 |
141 if (!PyArg_ParseTuple(args, "OOl", &a, &b, &bstart)) | 141 if (!PyArg_ParseTuple(args, "OOl", &a, &b, &bstart)) |
142 return NULL; | 142 return NULL; |
143 alen = PyList_Size(a); | 143 alen = PyList_Size(a); |