mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
expose PYTHON_API_VERSION macro as sys.api_version. Closes patch # 601456.
This commit is contained in:
parent
f62a89b1e0
commit
8e790e7007
3 changed files with 13 additions and 0 deletions
|
@ -793,6 +793,9 @@ _PySys_Init(void)
|
|||
PY_MICRO_VERSION, s,
|
||||
PY_RELEASE_SERIAL));
|
||||
Py_XDECREF(v);
|
||||
PyDict_SetItemString(sysdict, "api_version",
|
||||
v = PyInt_FromLong(PYTHON_API_VERSION));
|
||||
Py_XDECREF(v);
|
||||
PyDict_SetItemString(sysdict, "copyright",
|
||||
v = PyString_FromString(Py_GetCopyright()));
|
||||
Py_XDECREF(v);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue