Back to index

python3.2  3.2.2
Defines | Functions
getbuildinfo.c File Reference
#include "Python.h"
#include <stdio.h>

Go to the source code of this file.

Defines

#define DATE   "xx/xx/xx"
#define TIME   "xx:xx:xx"
#define SVNVERSION   "$WCRANGE$$WCMODS?M:$"
#define HGVERSION   ""
#define HGTAG   ""
#define HGBRANCH   ""

Functions

const char * Py_GetBuildInfo (void)
const char * _Py_svnversion (void)
const char * _Py_hgversion (void)
const char * _Py_hgidentifier (void)

Define Documentation

#define DATE   "xx/xx/xx"

Definition at line 11 of file getbuildinfo.c.

#define HGBRANCH   ""

Definition at line 39 of file getbuildinfo.c.

#define HGTAG   ""

Definition at line 36 of file getbuildinfo.c.

#define HGVERSION   ""

Definition at line 33 of file getbuildinfo.c.

#define SVNVERSION   "$WCRANGE$$WCMODS?M:$"

Definition at line 28 of file getbuildinfo.c.

#define TIME   "xx:xx:xx"

Definition at line 19 of file getbuildinfo.c.


Function Documentation

Definition at line 76 of file getbuildinfo.c.

{
    const char *hgtag, *hgid;
    hgtag = HGTAG;
    if ((*hgtag) && strcmp(hgtag, "tip") != 0)
        hgid = hgtag;
    else
        hgid = HGBRANCH;
    return hgid;
}

Here is the caller graph for this function:

const char* _Py_hgversion ( void  )

Definition at line 70 of file getbuildinfo.c.

{
    return HGVERSION;
}

Here is the caller graph for this function:

const char* _Py_svnversion ( void  )

Definition at line 60 of file getbuildinfo.c.

{
    /* the following string can be modified by subwcrev.exe */
    static const char svnversion[] = SVNVERSION;
    if (svnversion[0] != '$')
        return svnversion; /* it was interpolated, or passed on command line */
    return "Unversioned directory";
}
const char* Py_GetBuildInfo ( void  )

Definition at line 43 of file getbuildinfo.c.

{
    static char buildinfo[50 + sizeof(HGVERSION) +
                          ((sizeof(HGTAG) > sizeof(HGBRANCH)) ?
                           sizeof(HGTAG) : sizeof(HGBRANCH))];
    const char *revision = _Py_hgversion();
    const char *sep = *revision ? ":" : "";
    const char *hgid = _Py_hgidentifier();
    if (!(*hgid))
        hgid = "default";
    PyOS_snprintf(buildinfo, sizeof(buildinfo),
                  "%s%s%s, %.20s, %.9s", hgid, sep, revision,
                  DATE, TIME);
    return buildinfo;
}

Here is the call graph for this function:

Here is the caller graph for this function: