diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 68df57d8b8c..5dd89c40e42 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -7261,7 +7261,7 @@ unicode_repeat(PyUnicodeObject *str, Py_ssize_t len) done = str->length; } while (done < nchars) { - int n = (done <= nchars-done) ? done : nchars-done; + Py_ssize_t n = (done <= nchars-done) ? done : nchars-done; Py_UNICODE_COPY(p+done, p, n); done += n; } diff --git a/PC/_winreg.c b/PC/_winreg.c index 19f928e6c1d..dfc4cf8f4e6 100644 --- a/PC/_winreg.c +++ b/PC/_winreg.c @@ -715,7 +715,7 @@ countStrings(char *data, int len) static BOOL Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) { - int i,j; + Py_ssize_t i,j; switch (typ) { case REG_DWORD: if (value != Py_None && !PyInt_Check(value)) diff --git a/PC/w9xpopen.c b/PC/w9xpopen.c index f8439f218cc..b3978dd42d9 100644 --- a/PC/w9xpopen.c +++ b/PC/w9xpopen.c @@ -30,7 +30,7 @@ int main(int argc, char *argv[]) STARTUPINFO si; PROCESS_INFORMATION pi; DWORD exit_code=0; - int cmdlen = 0; + size_t cmdlen = 0; int i; char *cmdline, *cmdlinefill; diff --git a/Python/peephole.c b/Python/peephole.c index 430f93938ac..e9da377dc68 100644 --- a/Python/peephole.c +++ b/Python/peephole.c @@ -29,7 +29,7 @@ Also works for BUILD_LIST when followed by an "in" or "not in" test. */ static int -tuple_of_constants(unsigned char *codestr, int n, PyObject *consts) +tuple_of_constants(unsigned char *codestr, Py_ssize_t n, PyObject *consts) { PyObject *newconst, *constant; Py_ssize_t i, arg, len_consts; @@ -228,7 +228,7 @@ fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts) } static unsigned int * -markblocks(unsigned char *code, int len) +markblocks(unsigned char *code, Py_ssize_t len) { unsigned int *blocks = (unsigned int *)PyMem_Malloc(len*sizeof(int)); int i,j, opcode, blockcnt = 0;