Add python version with -v option
This commit is contained in:
parent
3a9238e7a1
commit
c83d63c8f2
3 changed files with 11 additions and 2 deletions
|
|
@ -44,5 +44,7 @@ PyObject* import_entrypoint();
|
|||
|
||||
void log_expt(int priority);
|
||||
|
||||
void pyfcgi_python_version(char[16]);
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -32,8 +32,9 @@ void usage()
|
|||
|
||||
void print_version(int fd)
|
||||
{
|
||||
dprintf(fd, "%s\n", PACKAGE_STRING);
|
||||
/**@todo TODO : get python version */
|
||||
char version[16];
|
||||
pyfcgi_python_version(version);
|
||||
dprintf(fd, "%s\nPython %s\n", PACKAGE_STRING, version);
|
||||
}
|
||||
|
||||
void default_conf()
|
||||
|
|
|
|||
|
|
@ -196,3 +196,9 @@ void log_expt(int priority)
|
|||
pyfcgi_log(priority, msg);
|
||||
}
|
||||
|
||||
void pyfcgi_python_version(char version[16])
|
||||
{
|
||||
snprintf(version, 16, "%d.%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION,
|
||||
PY_MICRO_VERSION);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue