summaryrefslogtreecommitdiffstats
path: root/Modules/getbuildinfo.c
diff options
context:
space:
mode:
authorBarry Warsaw <barry@python.org>2005-12-19 14:43:44 (GMT)
committerBarry Warsaw <barry@python.org>2005-12-19 14:43:44 (GMT)
commitce3a9131c37dc8e968156864e73e1ff544cf7ece (patch)
tree2b1d901f60cc59e8b71eafa7827efb5febfe8b0c /Modules/getbuildinfo.c
parent4ac13dfc3ad35ebbf9760d6e119b7f8220c52ce5 (diff)
downloadcpython-ce3a9131c37dc8e968156864e73e1ff544cf7ece.zip
cpython-ce3a9131c37dc8e968156864e73e1ff544cf7ece.tar.gz
cpython-ce3a9131c37dc8e968156864e73e1ff544cf7ece.tar.bz2
Revert most of r41765. Don't use $Revision$ in Py_GetBuildNumber(). Keep the
use of $(srcdir) in Makefile.pre.in so builds outside the source dir still work.
Diffstat (limited to 'Modules/getbuildinfo.c')
-rw-r--r--Modules/getbuildinfo.c34
1 files changed, 8 insertions, 26 deletions
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index 446340b..8b1ca22 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -21,38 +21,20 @@
#endif
#ifndef BUILD
-#define BUILD "$Revision$"
+#define BUILD "0"
#endif
const char *
-Py_GetBuildNumber(void)
-{
- static char buildno[20];
- static int buildno_okay;
-
- if (!buildno_okay) {
- char *build = BUILD;
- int len = strlen(build);
-
- if (len > 13 &&
- !strncmp(build, "$Revision: ", 11) &&
- !strcmp(build + len - 2, " $"))
- {
- memcpy(buildno, build + 11, len - 13);
- }
- else {
- memcpy(buildno, build, 19);
- }
- buildno_okay = 1;
- }
- return buildno;
-}
-
-const char *
Py_GetBuildInfo(void)
{
static char buildinfo[50];
PyOS_snprintf(buildinfo, sizeof(buildinfo),
- "#%s, %.20s, %.9s", Py_GetBuildNumber(), DATE, TIME);
+ "%s, %.20s, %.9s", BUILD, DATE, TIME);
return buildinfo;
}
+
+const char *
+Py_GetBuildNumber(void)
+{
+ return BUILD;
+}