From b11197045aa9ae96774adeb760fdc82f42d6999b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristj=C3=A1n=20Valur=20J=C3=B3nsson?= Date: Thu, 7 Jun 2007 23:56:18 +0000 Subject: [PATCH] backport change 55821 to release25-maint --- Modules/getbuildinfo.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index 0f71ca03d0..b673f3f98d 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -20,7 +20,14 @@ #endif #endif +/* on unix, SVNVERSION is passed on the command line. + * on Windows, the string is interpolated using + * subwcrev.exe + */ +#ifndef SVNVERSION #define SVNVERSION "$WCRANGE$$WCMODS?M:$" +#endif + const char * Py_GetBuildInfo(void) { @@ -39,7 +46,7 @@ _Py_svnversion(void) { /* the following string can be modified by subwcrev.exe */ static const char svnversion[] = SVNVERSION; - if (!strstr(svnversion, "$")) - return svnversion; /* it was interpolated */ + if (svnversion[0] != '$') + return svnversion; /* it was interpolated, or passed on command line */ return "exported"; } -- 2.50.1