]> granicus.if.org Git - python/commitdiff
Silence VS 2010 warning on loss of precision (_int64 -> _int32).
authorMartin v. Löwis <martin@v.loewis.de>
Tue, 15 May 2012 12:06:21 +0000 (14:06 +0200)
committerMartin v. Löwis <martin@v.loewis.de>
Tue, 15 May 2012 12:06:21 +0000 (14:06 +0200)
This is safe because the actual value is already range-checked.

Modules/_lzmamodule.c

index 029d4dd712bbdb020124aa525658b6a251245fcd..6720d4c04e32be8acd2cdb90caccfef692c00e32 100644 (file)
@@ -160,7 +160,7 @@ grow_buffer(PyObject **buf)
                             "Value too large for " #TYPE " type"); \
             return 0; \
         } \
-        *(TYPE *)ptr = val; \
+        *(TYPE *)ptr = (TYPE)val; \
         return 1; \
     }