Kaydet (Commit) 4677fbf7 authored tarafından Neal Norwitz's avatar Neal Norwitz

Try to fix a bunch of compiler warnings on Win64.

üst 40f5e4c5
...@@ -7261,7 +7261,7 @@ unicode_repeat(PyUnicodeObject *str, Py_ssize_t len) ...@@ -7261,7 +7261,7 @@ unicode_repeat(PyUnicodeObject *str, Py_ssize_t len)
done = str->length; done = str->length;
} }
while (done < nchars) { 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); Py_UNICODE_COPY(p+done, p, n);
done += n; done += n;
} }
......
...@@ -715,7 +715,7 @@ countStrings(char *data, int len) ...@@ -715,7 +715,7 @@ countStrings(char *data, int len)
static BOOL static BOOL
Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize) Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
{ {
int i,j; Py_ssize_t i,j;
switch (typ) { switch (typ) {
case REG_DWORD: case REG_DWORD:
if (value != Py_None && !PyInt_Check(value)) if (value != Py_None && !PyInt_Check(value))
......
...@@ -30,7 +30,7 @@ int main(int argc, char *argv[]) ...@@ -30,7 +30,7 @@ int main(int argc, char *argv[])
STARTUPINFO si; STARTUPINFO si;
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
DWORD exit_code=0; DWORD exit_code=0;
int cmdlen = 0; size_t cmdlen = 0;
int i; int i;
char *cmdline, *cmdlinefill; char *cmdline, *cmdlinefill;
......
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
Also works for BUILD_LIST when followed by an "in" or "not in" test. Also works for BUILD_LIST when followed by an "in" or "not in" test.
*/ */
static int 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; PyObject *newconst, *constant;
Py_ssize_t i, arg, len_consts; Py_ssize_t i, arg, len_consts;
...@@ -228,7 +228,7 @@ fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts) ...@@ -228,7 +228,7 @@ fold_unaryops_on_constants(unsigned char *codestr, PyObject *consts)
} }
static unsigned int * 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)); unsigned int *blocks = (unsigned int *)PyMem_Malloc(len*sizeof(int));
int i,j, opcode, blockcnt = 0; int i,j, opcode, blockcnt = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment