mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-110850: Replace _PyTime_t with PyTime_t (#115719)
Run command: sed -i -e 's!\<_PyTime_t\>!PyTime_t!g' $(find -name "*.c" -o -name "*.h")
This commit is contained in:
parent
0749244d13
commit
9af80ec83d
31 changed files with 341 additions and 341 deletions
|
@ -547,7 +547,7 @@ typedef struct _socket_state {
|
|||
PyObject *socket_gaierror;
|
||||
|
||||
/* Default timeout for new sockets */
|
||||
_PyTime_t defaulttimeout;
|
||||
PyTime_t defaulttimeout;
|
||||
|
||||
#if defined(HAVE_ACCEPT) || defined(HAVE_ACCEPT4)
|
||||
#if defined(HAVE_ACCEPT4) && defined(SOCK_CLOEXEC)
|
||||
|
@ -772,13 +772,13 @@ internal_setblocking(PySocketSockObject *s, int block)
|
|||
}
|
||||
|
||||
static int
|
||||
internal_select(PySocketSockObject *s, int writing, _PyTime_t interval,
|
||||
internal_select(PySocketSockObject *s, int writing, PyTime_t interval,
|
||||
int connect)
|
||||
{
|
||||
int n;
|
||||
#ifdef HAVE_POLL
|
||||
struct pollfd pollfd;
|
||||
_PyTime_t ms;
|
||||
PyTime_t ms;
|
||||
#else
|
||||
fd_set fds, efds;
|
||||
struct timeval tv, *tvp;
|
||||
|
@ -888,10 +888,10 @@ sock_call_ex(PySocketSockObject *s,
|
|||
void *data,
|
||||
int connect,
|
||||
int *err,
|
||||
_PyTime_t timeout)
|
||||
PyTime_t timeout)
|
||||
{
|
||||
int has_timeout = (timeout > 0);
|
||||
_PyTime_t deadline = 0;
|
||||
PyTime_t deadline = 0;
|
||||
int deadline_initialized = 0;
|
||||
int res;
|
||||
|
||||
|
@ -905,7 +905,7 @@ sock_call_ex(PySocketSockObject *s,
|
|||
runs asynchronously. */
|
||||
if (has_timeout || connect) {
|
||||
if (has_timeout) {
|
||||
_PyTime_t interval;
|
||||
PyTime_t interval;
|
||||
|
||||
if (deadline_initialized) {
|
||||
/* recompute the timeout */
|
||||
|
@ -3011,13 +3011,13 @@ Returns True if socket is in blocking mode, or False if it\n\
|
|||
is in non-blocking mode.");
|
||||
|
||||
static int
|
||||
socket_parse_timeout(_PyTime_t *timeout, PyObject *timeout_obj)
|
||||
socket_parse_timeout(PyTime_t *timeout, PyObject *timeout_obj)
|
||||
{
|
||||
#ifdef MS_WINDOWS
|
||||
struct timeval tv;
|
||||
#endif
|
||||
#ifndef HAVE_POLL
|
||||
_PyTime_t ms;
|
||||
PyTime_t ms;
|
||||
#endif
|
||||
int overflow = 0;
|
||||
|
||||
|
@ -3060,7 +3060,7 @@ socket_parse_timeout(_PyTime_t *timeout, PyObject *timeout_obj)
|
|||
static PyObject *
|
||||
sock_settimeout(PySocketSockObject *s, PyObject *arg)
|
||||
{
|
||||
_PyTime_t timeout;
|
||||
PyTime_t timeout;
|
||||
|
||||
if (socket_parse_timeout(&timeout, arg) < 0)
|
||||
return NULL;
|
||||
|
@ -4382,8 +4382,8 @@ sock_sendall(PySocketSockObject *s, PyObject *args)
|
|||
Py_buffer pbuf;
|
||||
struct sock_send ctx;
|
||||
int has_timeout = (s->sock_timeout > 0);
|
||||
_PyTime_t timeout = s->sock_timeout;
|
||||
_PyTime_t deadline = 0;
|
||||
PyTime_t timeout = s->sock_timeout;
|
||||
PyTime_t deadline = 0;
|
||||
int deadline_initialized = 0;
|
||||
PyObject *res = NULL;
|
||||
|
||||
|
@ -6931,7 +6931,7 @@ When the socket module is first imported, the default is None.");
|
|||
static PyObject *
|
||||
socket_setdefaulttimeout(PyObject *self, PyObject *arg)
|
||||
{
|
||||
_PyTime_t timeout;
|
||||
PyTime_t timeout;
|
||||
|
||||
if (socket_parse_timeout(&timeout, arg) < 0)
|
||||
return NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue