]> granicus.if.org Git - python/commitdiff
Clean up a warning on Win64. The downcast of the strlen size_t
authorTrent Mick <trentm@activestate.com>
Sat, 12 Aug 2000 21:37:39 +0000 (21:37 +0000)
committerTrent Mick <trentm@activestate.com>
Sat, 12 Aug 2000 21:37:39 +0000 (21:37 +0000)
return value to int is safe here because it previously checked that
there will be no overflow.

Objects/floatobject.c

index 4bed0dc29d8b5d09852212efafcf4b3a8edcf6d1..8182ae2ad8b05da54abb2293041044aab97c2639 100644 (file)
@@ -153,7 +153,7 @@ PyFloat_FromString(PyObject *v, char **pend)
                                            NULL))
                        return NULL;
                s = s_buffer;
-               len = strlen(s);
+               len = (int)strlen(s);
        }
        else if (PyObject_AsCharBuffer(v, &s, &len)) {
                PyErr_SetString(PyExc_TypeError,