Line | |
---|
1 | #include "Python.h"
|
---|
2 |
|
---|
3 | #ifndef DONT_HAVE_STDIO_H
|
---|
4 | #include <stdio.h>
|
---|
5 | #endif
|
---|
6 |
|
---|
7 | #ifndef DATE
|
---|
8 | #ifdef __DATE__
|
---|
9 | #define DATE __DATE__
|
---|
10 | #else
|
---|
11 | #define DATE "xx/xx/xx"
|
---|
12 | #endif
|
---|
13 | #endif
|
---|
14 |
|
---|
15 | #ifndef TIME
|
---|
16 | #ifdef __TIME__
|
---|
17 | #define TIME __TIME__
|
---|
18 | #else
|
---|
19 | #define TIME "xx:xx:xx"
|
---|
20 | #endif
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | #ifdef SUBWCREV
|
---|
24 | #define SVNVERSION "$WCRANGE$$WCMODS?M:$"
|
---|
25 | #endif
|
---|
26 |
|
---|
27 | const char *
|
---|
28 | Py_GetBuildInfo(void)
|
---|
29 | {
|
---|
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;
|
---|
38 | }
|
---|
39 |
|
---|
40 | const char *
|
---|
41 | _Py_svnversion(void)
|
---|
42 | {
|
---|
43 | #ifdef SVNVERSION
|
---|
44 | return SVNVERSION;
|
---|
45 | #else
|
---|
46 | return "exported";
|
---|
47 | #endif
|
---|
48 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.