Mercurial > cpython-lru_cache-weakref
diff Python/sysmodule.c @ 25099:a69a12484d69 legacy-trunk
expose PYTHON_API_VERSION macro as sys.api_version. Closes patch # 601456.
| author | Skip Montanaro <skip@pobox.com> |
|---|---|
| date | Tue, 03 Sep 2002 13:25:17 +0000 |
| parents | fdf80e04e4bb |
| children | 3a26e352f0a6 |
line wrap: on
line diff
--- a/Python/sysmodule.c Tue Sep 03 11:52:44 2002 +0000 +++ b/Python/sysmodule.c Tue Sep 03 13:25:17 2002 +0000 @@ -793,6 +793,9 @@ 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);
