]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix two compiler warnings on Win64.
authorThomas Heller <theller@ctypes.org>
Thu, 15 Nov 2007 20:03:00 +0000 (20:03 +0000)
committerThomas Heller <theller@ctypes.org>
Thu, 15 Nov 2007 20:03:00 +0000 (20:03 +0000)
Modules/_ctypes/_ctypes.c
Modules/_ctypes/libffi_msvc/prep_cif.c

index 39dfdefec2ca00768b25cf735a206386b3a03cb6..05a9fca4bf6d90a22a225b8d9285240d72290f1b 100644 (file)
@@ -1477,7 +1477,7 @@ SimpleType_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
        StgDictObject *stgdict;
        PyObject *proto;
        const char *proto_str;
-       int proto_len;
+       Py_ssize_t proto_len;
        PyMethodDef *ml;
        struct fielddesc *fmt;
 
index 2650fa05254e225721efb036bb5364d8aff7ab63..cd623a1462c9069db1b17a58afefbcdcb3077d69 100644 (file)
@@ -163,7 +163,7 @@ ffi_status ffi_prep_cif(/*@out@*/ /*@partial@*/ ffi_cif *cif,
            bytes = ALIGN(bytes, (*ptr)->alignment);
          
 #endif
-         bytes += STACK_ARG_SIZE((*ptr)->size);
+         bytes += (unsigned)STACK_ARG_SIZE((*ptr)->size);
        }
 #endif
     }