diff options
author | Petr Viktorin <encukou@gmail.com> | 2025-01-09 10:10:28 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-09 10:10:28 (GMT) |
commit | 1439b81928f1b52c5a0ac7fd81fdd66afd5f72da (patch) | |
tree | 327fda70fac52911985d6c15f062e374a3734fd6 /Python | |
parent | 4685401845ba3e2ab8c9f4a9a10aa2969b11985f (diff) | |
download | cpython-1439b81928f1b52c5a0ac7fd81fdd66afd5f72da.zip cpython-1439b81928f1b52c5a0ac7fd81fdd66afd5f72da.tar.gz cpython-1439b81928f1b52c5a0ac7fd81fdd66afd5f72da.tar.bz2 |
gh-128629: Add Py_PACK_VERSION and Py_PACK_FULL_VERSION (GH-128630)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/modsupport.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Python/modsupport.c b/Python/modsupport.c index 0fb7783..517dc97 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -648,3 +648,20 @@ PyModule_AddType(PyObject *module, PyTypeObject *type) return PyModule_AddObjectRef(module, name, (PyObject *)type); } + + +/* Exported functions for version helper macros */ + +#undef Py_PACK_FULL_VERSION +uint32_t +Py_PACK_FULL_VERSION(int x, int y, int z, int level, int serial) +{ + return _Py_PACK_FULL_VERSION(x, y, z, level, serial); +} + +#undef Py_PACK_VERSION +uint32_t +Py_PACK_VERSION(int x, int y) +{ + return Py_PACK_FULL_VERSION(x, y, 0, 0, 0); +} |