[Python-checkins] r72345 - in python/branches/release26-maint: Modules/_ctypes/cfield.c Modules/_randommodule.c

mark.dickinson python-checkins at python.org
Tue May 5 19:43:00 CEST 2009


Author: mark.dickinson
Date: Tue May 5 19:42:59 2009
New Revision: 72345
Log:
Merged revisions 72344 via svnmerge from 
svn+ssh://pythondev@svn.python.org/python/trunk
........
 r72344 | mark.dickinson | 2009年05月05日 18:41:47 +0100 (2009年5月05日) | 3 lines
 
 Issue #5933: Fix some gcc -Wextra warnings. Thanks Victor Stinner for
 the patch.
........
Modified:
 python/branches/release26-maint/ (props changed)
 python/branches/release26-maint/Modules/_ctypes/cfield.c
 python/branches/release26-maint/Modules/_randommodule.c
Modified: python/branches/release26-maint/Modules/_ctypes/cfield.c
==============================================================================
--- python/branches/release26-maint/Modules/_ctypes/cfield.c	(original)
+++ python/branches/release26-maint/Modules/_ctypes/cfield.c	Tue May 5 19:42:59 2009
@@ -372,7 +372,7 @@
 		return -1;
 	}
 	x = PyInt_AsUnsignedLongMask(v);
-	if (x == -1 && PyErr_Occurred())
+	if (x == (unsigned long)-1 && PyErr_Occurred())
 		return -1;
 	*p = x;
 	return 0;
@@ -410,7 +410,7 @@
 		return -1;
 	}
 	x = PyInt_AsUnsignedLongLongMask(v);
-	if (x == -1 && PyErr_Occurred())
+	if (x == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())
 		return -1;
 	*p = x;
 	return 0;
Modified: python/branches/release26-maint/Modules/_randommodule.c
==============================================================================
--- python/branches/release26-maint/Modules/_randommodule.c	(original)
+++ python/branches/release26-maint/Modules/_randommodule.c	Tue May 5 19:42:59 2009
@@ -355,7 +355,7 @@
 
 	for (i=0; i<N ; i++) {
 		element = PyLong_AsUnsignedLong(PyTuple_GET_ITEM(state, i));
-		if (element == -1 && PyErr_Occurred())
+		if (element == (unsigned long)-1 && PyErr_Occurred())
 			return NULL;
 		self->state[i] = element & 0xffffffffUL; /* Make sure we get sane state */
 	}


More information about the Python-checkins mailing list

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