[Python-checkins] r79891 - python/branches/release31-maint/Objects/longobject.c

stefan.krah python-checkins at python.org
Wed Apr 7 12:20:35 CEST 2010


Author: stefan.krah
Date: Wed Apr  7 12:20:34 2010
New Revision: 79891

Log:
Issue #8328: Silence Visual Studio warnings.

Modified:
   python/branches/release31-maint/Objects/longobject.c

Modified: python/branches/release31-maint/Objects/longobject.c
==============================================================================
--- python/branches/release31-maint/Objects/longobject.c	(original)
+++ python/branches/release31-maint/Objects/longobject.c	Wed Apr  7 12:20:34 2010
@@ -1333,7 +1333,7 @@
 	int ndigits = 0;
 
 	if (ival < PyLong_BASE)
-		return PyLong_FromLong(ival);
+		return PyLong_FromLong((long)ival);
 	/* Count the number of Python digits. */
 	t = ival;
 	while (t) {
@@ -4053,7 +4053,7 @@
 	Py_DECREF(result);
 	result = y;
 
-	x = (PyLongObject *)PyLong_FromLong(msd_bits);
+	x = (PyLongObject *)PyLong_FromLong((long)msd_bits);
 	if (x == NULL)
 		goto error;
 	y = (PyLongObject *)long_add(result, x);


More information about the Python-checkins mailing list