diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-01-05 10:00:36 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-01-05 10:00:36 (GMT) |
commit | dea59e5755526be328aa6d330ce730e387a7562d (patch) | |
tree | b2b05d27be8170b1e28df4d570e1e12b41946d9f /Modules | |
parent | c6d1f9100f8cb80dec5b1a454d3bdb54f6f76f98 (diff) | |
download | cpython-dea59e5755526be328aa6d330ce730e387a7562d.zip cpython-dea59e5755526be328aa6d330ce730e387a7562d.tar.gz cpython-dea59e5755526be328aa6d330ce730e387a7562d.tar.bz2 |
Stop maintaining the buildno file.
Also, stop determining Unicode sizes with PyString_GET_SIZE.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/getbuildinfo.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index 8b1ca22..7343a0f 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -20,21 +20,30 @@ #endif #endif -#ifndef BUILD -#define BUILD "0" -#endif +static const char revision[] = "$Revision$"; +static const char headurl[] = "$HeadURL$"; const char * Py_GetBuildInfo(void) { static char buildinfo[50]; +#ifdef SVNVERSION + static char svnversion[] = SVNVERSION; +#else + static char svnversion[20] = "unknown"; + if (strstr(headurl, "/tags/") != NULL) { + int start = ; + strncpy(svnversion, revision+start, stop-start); + svnversion[stop-start] = '\0'; + } +#endif PyOS_snprintf(buildinfo, sizeof(buildinfo), - "%s, %.20s, %.9s", BUILD, DATE, TIME); + "%s, %.20s, %.9s", svnversion, DATE, TIME); return buildinfo; } const char * Py_GetBuildNumber(void) { - return BUILD; + return "0"; } |