/
githubmirror
/
cpython
Обзор
Документация
Войти
/
githubmirror
/
cpython
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
v3.12.13
Python/getversion.c
28 строк
552 B
Eric Snow
gh-81057: Move Globals in Core Code to _PyRuntimeState (gh-99496)
15 ноя 2022, 19:45
Не верифицирован
15 ноя 2022, 19:45
3c57971
Код
Авторство
О чём код?
/* Return the full version string. */ #include "Python.h" #include "patchlevel.h" static int initialized = 0; static char version[250]; void _Py_InitVersion(void) { if (initialized) { return; } initialized = 1; PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler()); } const char * Py_GetVersion(void) { _Py_InitVersion(); return version; } // Export the Python hex version as a constant. const unsigned long Py_Version = PY_VERSION_HEX;