mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
sysmodule.c: reuse Py_STRINGIFY() macro
This commit is contained in:
parent
cf156bc248
commit
cf01b68b88
1 changed files with 2 additions and 6 deletions
|
@ -1643,15 +1643,11 @@ make_version_info(void)
|
||||||
/* sys.implementation values */
|
/* sys.implementation values */
|
||||||
#define NAME "cpython"
|
#define NAME "cpython"
|
||||||
const char *_PySys_ImplName = NAME;
|
const char *_PySys_ImplName = NAME;
|
||||||
#define QUOTE(arg) #arg
|
#define MAJOR Py_STRINGIFY(PY_MAJOR_VERSION)
|
||||||
#define STRIFY(name) QUOTE(name)
|
#define MINOR Py_STRINGIFY(PY_MINOR_VERSION)
|
||||||
#define MAJOR STRIFY(PY_MAJOR_VERSION)
|
|
||||||
#define MINOR STRIFY(PY_MINOR_VERSION)
|
|
||||||
#define TAG NAME "-" MAJOR MINOR
|
#define TAG NAME "-" MAJOR MINOR
|
||||||
const char *_PySys_ImplCacheTag = TAG;
|
const char *_PySys_ImplCacheTag = TAG;
|
||||||
#undef NAME
|
#undef NAME
|
||||||
#undef QUOTE
|
|
||||||
#undef STRIFY
|
|
||||||
#undef MAJOR
|
#undef MAJOR
|
||||||
#undef MINOR
|
#undef MINOR
|
||||||
#undef TAG
|
#undef TAG
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue