[Python-checkins] cpython: Silence VS 2010 warning on loss of precision (_int64 -> _int32).

martin.v.loewis python-checkins at python.org
Tue May 15 14:06:43 CEST 2012


http://hg.python.org/cpython/rev/d341898ee4e3
changeset:   76945:d341898ee4e3
user:        Martin v. Löwis <martin at v.loewis.de>
date:        Tue May 15 14:06:21 2012 +0200
summary:
  Silence VS 2010 warning on loss of precision (_int64 -> _int32).
This is safe because the actual value is already range-checked.

files:
  Modules/_lzmamodule.c |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Modules/_lzmamodule.c b/Modules/_lzmamodule.c
--- a/Modules/_lzmamodule.c
+++ b/Modules/_lzmamodule.c
@@ -160,7 +160,7 @@
                             "Value too large for " #TYPE " type"); \
             return 0; \
         } \
-        *(TYPE *)ptr = val; \
+        *(TYPE *)ptr = (TYPE)val; \
         return 1; \
     }
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list