[Python-checkins] r55821 - python/trunk/Modules/getbuildinfo.c

kristjan.jonsson python-checkins at python.org
Fri Jun 8 01:53:55 CEST 2007


Author: kristjan.jonsson
Date: Fri Jun  8 01:53:49 2007
New Revision: 55821

Modified:
   python/trunk/Modules/getbuildinfo.c
Log:
Fixing changes to getbuildinfo.c that broke linux builds

Modified: python/trunk/Modules/getbuildinfo.c
==============================================================================
--- python/trunk/Modules/getbuildinfo.c	(original)
+++ python/trunk/Modules/getbuildinfo.c	Fri Jun  8 01:53:49 2007
@@ -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 @@
 {
 	/* 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";
 }


More information about the Python-checkins mailing list