summaryrefslogtreecommitdiffstats
path: root/Modules/getbuildinfo.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/getbuildinfo.c')
-rw-r--r--Modules/getbuildinfo.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index a017dab..0f71ca0 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -20,10 +20,7 @@
#endif
#endif
-#ifdef SUBWCREV
#define SVNVERSION "$WCRANGE$$WCMODS?M:$"
-#endif
-
const char *
Py_GetBuildInfo(void)
{
@@ -40,9 +37,9 @@ Py_GetBuildInfo(void)
const char *
_Py_svnversion(void)
{
-#ifdef SVNVERSION
- return SVNVERSION;
-#else
+ /* the following string can be modified by subwcrev.exe */
+ static const char svnversion[] = SVNVERSION;
+ if (!strstr(svnversion, "$"))
+ return svnversion; /* it was interpolated */
return "exported";
-#endif
}