Updated documentation for findCaller() to indicate that a 3-tuple is now returned...
[python.git] / Modules / getbuildinfo.c
bloba017dab062acb3517a19d4c7d81fb3e92d5e284b
1 #include "Python.h"
3 #ifndef DONT_HAVE_STDIO_H
4 #include <stdio.h>
5 #endif
7 #ifndef DATE
8 #ifdef __DATE__
9 #define DATE __DATE__
10 #else
11 #define DATE "xx/xx/xx"
12 #endif
13 #endif
15 #ifndef TIME
16 #ifdef __TIME__
17 #define TIME __TIME__
18 #else
19 #define TIME "xx:xx:xx"
20 #endif
21 #endif
23 #ifdef SUBWCREV
24 #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
25 #endif
27 const char *
28 Py_GetBuildInfo(void)
30 static char buildinfo[50];
31 const char *revision = Py_SubversionRevision();
32 const char *sep = *revision ? ":" : "";
33 const char *branch = Py_SubversionShortBranch();
34 PyOS_snprintf(buildinfo, sizeof(buildinfo),
35 "%s%s%s, %.20s, %.9s", branch, sep, revision,
36 DATE, TIME);
37 return buildinfo;
40 const char *
41 _Py_svnversion(void)
43 #ifdef SVNVERSION
44 return SVNVERSION;
45 #else
46 return "exported";
47 #endif