diff options
author | Victor Stinner <vstinner@python.org> | 2024-02-20 23:16:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 22:16:37 +0000 |
commit | 52d14775665a6fde518ee3da88a73f39b09d993f (patch) | |
tree | 7aa83b307d5af59761a769d4a54746b7a7c81fc2 /Python/import.c | |
parent | e1fdc3c323bd605f92622b7ee18805885ff0bb4e (diff) | |
download | cpython-52d14775665a6fde518ee3da88a73f39b09d993f.tar.gz cpython-52d14775665a6fde518ee3da88a73f39b09d993f.zip |
gh-110850: Rename internal PyTime C API functions (#115734)
Rename functions:
* _PyTime_GetSystemClock() => _PyTime_TimeUnchecked()
* _PyTime_GetPerfCounter() => _PyTime_PerfCounterUnchecked()
* _PyTime_GetMonotonicClock() => _PyTime_MonotonicUnchecked()
* _PyTime_GetSystemClockWithInfo() => _PyTime_TimeWithInfo()
* _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo()
* _PyTime_GetMonotonicClockWithInfo() => _PyTime_MonotonicWithInfo()
Changes:
* Remove "typedef PyTime_t PyTime_t;" which was
"typedef PyTime_t _PyTime_t;" before a previous rename.
* Update comments of "Unchecked" functions.
* Remove invalid PyTime_Time() comment.
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/import.c b/Python/import.c index a8fed677552..dc92708c8b6 100644 --- a/Python/import.c +++ b/Python/import.c @@ -13,7 +13,7 @@ #include "pycore_pymem.h" // _PyMem_SetDefaultAllocator() #include "pycore_pystate.h" // _PyInterpreterState_GET() #include "pycore_sysmodule.h" // _PySys_Audit() -#include "pycore_time.h" // _PyTime_GetPerfCounter() +#include "pycore_time.h" // _PyTime_PerfCounterUnchecked() #include "pycore_weakref.h" // _PyWeakref_GET_REF() #include "marshal.h" // PyMarshal_ReadObjectFromString() @@ -2748,7 +2748,7 @@ import_find_and_load(PyThreadState *tstate, PyObject *abs_name) #undef header import_level++; - t1 = _PyTime_GetPerfCounter(); + t1 = _PyTime_PerfCounterUnchecked(); accumulated = 0; } @@ -2763,7 +2763,7 @@ import_find_and_load(PyThreadState *tstate, PyObject *abs_name) mod != NULL); if (import_time) { - PyTime_t cum = _PyTime_GetPerfCounter() - t1; + PyTime_t cum = _PyTime_PerfCounterUnchecked() - t1; import_level--; fprintf(stderr, "import time: %9ld | %10ld | %*s%s\n", |