[Python-checkins] r71595 - python/branches/py3k-short-float-repr/Python/dtoa.c

mark.dickinson python-checkins at python.org
Tue Apr 14 00:50:43 CEST 2009


Author: mark.dickinson
Date: Tue Apr 14 00:50:43 2009
New Revision: 71595
Log:
Fix some compiler warnings on Windows
Modified:
 python/branches/py3k-short-float-repr/Python/dtoa.c
Modified: python/branches/py3k-short-float-repr/Python/dtoa.c
==============================================================================
--- python/branches/py3k-short-float-repr/Python/dtoa.c	(original)
+++ python/branches/py3k-short-float-repr/Python/dtoa.c	Tue Apr 14 00:50:43 2009
@@ -404,7 +404,7 @@
 Bfree(b);
 b = b1;
 }
- b->x[wds++] = carry;
+ b->x[wds++] = (ULong)carry;
 b->wds = wds;
 }
 return b;
@@ -593,7 +593,7 @@
 *xc++ = z & FFFFFFFF;
 }
 while(x < xae);
- *xc = carry;
+ *xc = (ULong)carry;
 }
 }
 #else
@@ -1872,7 +1872,7 @@
 else {
 if (bc.scale && y <= 2*P*Exp_msk1) {
 if (aadj <= 0x7fffffff) {
- if ((z = aadj) <= 0)
+ if ((z = (ULong)aadj) <= 0)
 z = 1;
 aadj = z;
 aadj1 = bc.dsign ? aadj : -aadj;
@@ -1944,7 +1944,7 @@
 
 j = sizeof(ULong);
 for(k = 0;
- sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= i;
+ sizeof(Bigint) - sizeof(ULong) - sizeof(int) + j <= (unsigned)i;
 j <<= 1)
 k++;
 r = (int*)Balloc(k);
@@ -2274,7 +2274,7 @@
 */
 dval(&eps) = 0.5/tens[ilim-1] - dval(&eps);
 for(i = 0;;) {
- L = dval(&u);
+ L = (Long)dval(&u);
 dval(&u) -= L;
 *s++ = '0' + (int)L;
 if (dval(&u) < dval(&eps))


More information about the Python-checkins mailing list

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