mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Stop maintaining the buildno file.
Also, stop determining Unicode sizes with PyString_GET_SIZE.
This commit is contained in:
parent
c6d1f9100f
commit
dea59e5755
5 changed files with 88 additions and 37 deletions
|
@ -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";
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue