mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Always generate floats for stat_result; fix configure test.
This commit is contained in:
parent
94717ed1d4
commit
a32c994129
5 changed files with 10 additions and 20 deletions
|
@ -616,15 +616,7 @@ static void
|
|||
fill_time(PyObject *v, int index, time_t sec, unsigned long nsec)
|
||||
{
|
||||
PyObject *val;
|
||||
if (nsec) {
|
||||
val = PyFloat_FromDouble(sec + 1e-9*nsec);
|
||||
} else {
|
||||
#if SIZEOF_TIME_T > SIZEOF_LONG
|
||||
val = PyLong_FromLongLong((LONG_LONG)sec);
|
||||
#else
|
||||
val = PyInt_FromLong((long)sec);
|
||||
#endif
|
||||
}
|
||||
val = PyFloat_FromDouble(sec + 1e-9*nsec);
|
||||
PyStructSequence_SET_ITEM(v, index, val);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue