diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/datetimemodule.c | 2 | ||||
-rw-r--r-- | Modules/getbuildinfo.c | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/Modules/datetimemodule.c b/Modules/datetimemodule.c index 7487c50..1f13238 100644 --- a/Modules/datetimemodule.c +++ b/Modules/datetimemodule.c @@ -13,7 +13,9 @@ /* Differentiate between building the core module and building extension * modules. */ +#ifndef Py_BUILD_CORE #define Py_BUILD_CORE +#endif #include "datetime.h" #undef Py_BUILD_CORE 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 } |