convert from long long to PyLong loselessly (#1106)

This commit is contained in:
Benjamin Peterson 2017-04-13 01:44:54 -07:00 committed by Victor Stinner
parent a6902e662c
commit 2c134c3125
1 changed files with 1 additions and 1 deletions

View File

@ -3813,7 +3813,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);