]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
convert from long long to PyLong loselessly (#1106) (#1121)
authorBenjamin Peterson <benjamin@python.org>
Thu, 13 Apr 2017 21:11:48 +0000 (14:11 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Apr 2017 21:11:48 +0000 (14:11 -0700)
Modules/_testcapimodule.c

index f09205f63cc5abca192e3e57bfeba3f57ab260a0..b25f4434ffa35c4bc35a95e38eb26cdf41119150 100644 (file)
@@ -3812,7 +3812,7 @@ test_PyTime_AsTimeval(PyObject *self, PyObject *args)
     if (_PyTime_AsTimeval(t, &tv, round) < 0)
         return NULL;
 
-    seconds = PyLong_FromLong((long long)tv.tv_sec);
+    seconds = PyLong_FromLongLong(tv.tv_sec);
     if (seconds == NULL)
         return NULL;
     return Py_BuildValue("Nl", seconds, tv.tv_usec);