summaryrefslogtreecommitdiffstats
path: root/Modules/getbuildinfo.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-01-05 10:33:59 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-01-05 10:33:59 (GMT)
commitc5bf5a00a35dae7d31d1b6eeada0567d7973c5c7 (patch)
tree3f9fdb52b1895205530adc2dd8ceddf3d02b67ad /Modules/getbuildinfo.c
parentdea59e5755526be328aa6d330ce730e387a7562d (diff)
downloadcpython-c5bf5a00a35dae7d31d1b6eeada0567d7973c5c7.zip
cpython-c5bf5a00a35dae7d31d1b6eeada0567d7973c5c7.tar.gz
cpython-c5bf5a00a35dae7d31d1b6eeada0567d7973c5c7.tar.bz2
Always set SVNVERSION to "exported" if it otherwise fails.
Diffstat (limited to 'Modules/getbuildinfo.c')
-rw-r--r--Modules/getbuildinfo.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index 7343a0f..1ff061f 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -28,15 +28,17 @@ Py_GetBuildInfo(void)
{
static char buildinfo[50];
#ifdef SVNVERSION
- static char svnversion[] = SVNVERSION;
+ static char svnversion[50] = SVNVERSION;
#else
- static char svnversion[20] = "unknown";
- if (strstr(headurl, "/tags/") != NULL) {
- int start = ;
+ static char svnversion[50] = "exported";
+#endif
+ if (strcmp(svnversion, "exported") == 0 &&
+ strstr(headurl, "/tags/") != NULL) {
+ int start = 11;
+ int stop = strlen(revision)-2;
strncpy(svnversion, revision+start, stop-start);
svnversion[stop-start] = '\0';
}
-#endif
PyOS_snprintf(buildinfo, sizeof(buildinfo),
"%s, %.20s, %.9s", svnversion, DATE, TIME);
return buildinfo;