[Python-checkins] cpython: sysmodule.c: reuse Py_STRINGIFY() macro

victor.stinner python-checkins at python.org
Thu Nov 5 05:22:33 EST 2015


https://hg.python.org/cpython/rev/8ade9d907f31
changeset:   98966:8ade9d907f31
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Thu Nov 05 11:21:38 2015 +0100
summary:
  sysmodule.c: reuse Py_STRINGIFY() macro

files:
  Python/sysmodule.c |  8 ++------
  1 files changed, 2 insertions(+), 6 deletions(-)


diff --git a/Python/sysmodule.c b/Python/sysmodule.c
--- a/Python/sysmodule.c
+++ b/Python/sysmodule.c
@@ -1643,15 +1643,11 @@
 /* sys.implementation values */
 #define NAME "cpython"
 const char *_PySys_ImplName = NAME;
-#define QUOTE(arg) #arg
-#define STRIFY(name) QUOTE(name)
-#define MAJOR STRIFY(PY_MAJOR_VERSION)
-#define MINOR STRIFY(PY_MINOR_VERSION)
+#define MAJOR Py_STRINGIFY(PY_MAJOR_VERSION)
+#define MINOR Py_STRINGIFY(PY_MINOR_VERSION)
 #define TAG NAME "-" MAJOR MINOR
 const char *_PySys_ImplCacheTag = TAG;
 #undef NAME
-#undef QUOTE
-#undef STRIFY
 #undef MAJOR
 #undef MINOR
 #undef TAG

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list