[Python-checkins] r61864 - in python/trunk: Objects/unicodeobject.c PC/_winreg.c PC/w9xpopen.c Python/peephole.c

neal.norwitz python-checkins at python.org
Tue Mar 25 05:18:19 CET 2008


Author: neal.norwitz
Date: Tue Mar 25 05:18:18 2008
New Revision: 61864
Modified:
 python/trunk/Objects/unicodeobject.c
 python/trunk/PC/_winreg.c
 python/trunk/PC/w9xpopen.c
 python/trunk/Python/peephole.c
Log:
Try to fix a bunch of compiler warnings on Win64.
Modified: python/trunk/Objects/unicodeobject.c
==============================================================================
--- python/trunk/Objects/unicodeobject.c	(original)
+++ python/trunk/Objects/unicodeobject.c	Tue Mar 25 05:18:18 2008
@@ -7261,7 +7261,7 @@
 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;
 	}
Modified: python/trunk/PC/_winreg.c
==============================================================================
--- python/trunk/PC/_winreg.c	(original)
+++ python/trunk/PC/_winreg.c	Tue Mar 25 05:18:18 2008
@@ -715,7 +715,7 @@
 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))
Modified: python/trunk/PC/w9xpopen.c
==============================================================================
--- python/trunk/PC/w9xpopen.c	(original)
+++ python/trunk/PC/w9xpopen.c	Tue Mar 25 05:18:18 2008
@@ -30,7 +30,7 @@
 STARTUPINFO si;
 PROCESS_INFORMATION pi;
 DWORD exit_code=0;
- int cmdlen = 0;
+ size_t cmdlen = 0;
 int i;
 char *cmdline, *cmdlinefill;
 
Modified: python/trunk/Python/peephole.c
==============================================================================
--- python/trunk/Python/peephole.c	(original)
+++ python/trunk/Python/peephole.c	Tue Mar 25 05:18:18 2008
@@ -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 @@
 }
 
 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;


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /