]> granicus.if.org Git - python/commitdiff
backport change 55821 to release25-maint
authorKristján Valur Jónsson <kristjan@ccpgames.com>
Thu, 7 Jun 2007 23:56:18 +0000 (23:56 +0000)
committerKristján Valur Jónsson <kristjan@ccpgames.com>
Thu, 7 Jun 2007 23:56:18 +0000 (23:56 +0000)
Modules/getbuildinfo.c

index 0f71ca03d0a52894cd4817ea16ebe8048028a6b3..b673f3f98d4150a2993dcd37fa5e8eaf07d2ce7d 100644 (file)
 #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";
 }