]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Try to fix a bunch of compiler warnings on Win64.
authorNeal Norwitz <nnorwitz@gmail.com>
Tue, 25 Mar 2008 04:18:18 +0000 (04:18 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Tue, 25 Mar 2008 04:18:18 +0000 (04:18 +0000)
Objects/unicodeobject.c
PC/_winreg.c
PC/w9xpopen.c
Python/peephole.c

index 68df57d8b8ca83aa4268e1597ea08eb37c8f1819..5dd89c40e423e76d68c06f006d055a57e4b31a4f 100644 (file)
@@ -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;
        }
index 19f928e6c1dec5aeda1dafe246a39765761ba79d..dfc4cf8f4e68781a995dbd482f4e1145016b7c59 100644 (file)
@@ -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))
index f8439f218cc39ddae151fe803f07706f5bab3934..b3978dd42d9bb6a7e85a75fc4f3dee258f80d382 100644 (file)
@@ -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;
 
index 430f93938acfb9a39e2ddbdda24cfcef096540ca..e9da377dc68f9a4a562793f048d044a1c9699aa9 100644 (file)
@@ -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;