mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
gh-110850: Use public PyTime functions (#115746)
Replace private _PyTime functions with public PyTime functions. random_seed_time_pid() now reports errors to its caller.
This commit is contained in:
parent
52d1477566
commit
145bc2d638
12 changed files with 39 additions and 55 deletions
|
|
@ -3113,7 +3113,7 @@ sock_gettimeout(PySocketSockObject *s, PyObject *Py_UNUSED(ignored))
|
|||
Py_RETURN_NONE;
|
||||
}
|
||||
else {
|
||||
double seconds = _PyTime_AsSecondsDouble(s->sock_timeout);
|
||||
double seconds = PyTime_AsSecondsDouble(s->sock_timeout);
|
||||
return PyFloat_FromDouble(seconds);
|
||||
}
|
||||
}
|
||||
|
|
@ -6917,7 +6917,7 @@ socket_getdefaulttimeout(PyObject *self, PyObject *Py_UNUSED(ignored))
|
|||
Py_RETURN_NONE;
|
||||
}
|
||||
else {
|
||||
double seconds = _PyTime_AsSecondsDouble(state->defaulttimeout);
|
||||
double seconds = PyTime_AsSecondsDouble(state->defaulttimeout);
|
||||
return PyFloat_FromDouble(seconds);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue