]> granicus.if.org Git - python/commitdiff
Issue #9566: _io: Use Py_SAFE_DOWNCAST for fix a compiler warning on Windows x64
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 24 Jun 2013 21:01:33 +0000 (23:01 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 24 Jun 2013 21:01:33 +0000 (23:01 +0200)
Modules/_io/textio.c

index 4d0009da5b4d0f26a752db73a7676bf0d471c83e..283411b10caaaa558e93c2d7cffe69093a53cb78 100644 (file)
@@ -2347,7 +2347,7 @@ textiowrapper_tell(textio *self, PyObject *args)
 
     /* Note our initial start point. */
     cookie.start_pos += skip_bytes;
-    cookie.chars_to_skip = chars_to_skip;
+    cookie.chars_to_skip = Py_SAFE_DOWNCAST(chars_to_skip, Py_ssize_t, int);
     if (chars_to_skip == 0)
         goto finally;