mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +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
|
@ -235,14 +235,14 @@ lock_dealloc(lockobject *self)
|
|||
}
|
||||
|
||||
static inline PyLockStatus
|
||||
acquire_timed(PyThread_type_lock lock, _PyTime_t timeout)
|
||||
acquire_timed(PyThread_type_lock lock, PyTime_t timeout)
|
||||
{
|
||||
return PyThread_acquire_lock_timed_with_retries(lock, timeout);
|
||||
}
|
||||
|
||||
static int
|
||||
lock_acquire_parse_args(PyObject *args, PyObject *kwds,
|
||||
_PyTime_t *timeout)
|
||||
PyTime_t *timeout)
|
||||
{
|
||||
char *kwlist[] = {"blocking", "timeout", NULL};
|
||||
int blocking = 1;
|
||||
|
@ -253,7 +253,7 @@ lock_acquire_parse_args(PyObject *args, PyObject *kwds,
|
|||
|
||||
// XXX Use PyThread_ParseTimeoutArg().
|
||||
|
||||
const _PyTime_t unset_timeout = _PyTime_FromSeconds(-1);
|
||||
const PyTime_t unset_timeout = _PyTime_FromSeconds(-1);
|
||||
*timeout = unset_timeout;
|
||||
|
||||
if (timeout_obj
|
||||
|
@ -274,7 +274,7 @@ lock_acquire_parse_args(PyObject *args, PyObject *kwds,
|
|||
if (!blocking)
|
||||
*timeout = 0;
|
||||
else if (*timeout != unset_timeout) {
|
||||
_PyTime_t microseconds;
|
||||
PyTime_t microseconds;
|
||||
|
||||
microseconds = _PyTime_AsMicroseconds(*timeout, _PyTime_ROUND_TIMEOUT);
|
||||
if (microseconds > PY_TIMEOUT_MAX) {
|
||||
|
@ -289,7 +289,7 @@ lock_acquire_parse_args(PyObject *args, PyObject *kwds,
|
|||
static PyObject *
|
||||
lock_PyThread_acquire_lock(lockobject *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
_PyTime_t timeout;
|
||||
PyTime_t timeout;
|
||||
if (lock_acquire_parse_args(args, kwds, &timeout) < 0)
|
||||
return NULL;
|
||||
|
||||
|
@ -501,7 +501,7 @@ rlock_is_owned_by(rlockobject *self, PyThread_ident_t tid)
|
|||
static PyObject *
|
||||
rlock_acquire(rlockobject *self, PyObject *args, PyObject *kwds)
|
||||
{
|
||||
_PyTime_t timeout;
|
||||
PyTime_t timeout;
|
||||
PyThread_ident_t tid;
|
||||
PyLockStatus r = PY_LOCK_ACQUIRED;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue