view Python/getversion.c @ 19178:ca12e1e333ea legacy-trunk

Patch by Jonathan Wight (slightly reformatted) to forestall loading the same module twice, which apparently crashes Python. I could not test the error condition, but in normal life it seems to have no adverse effects. Also removed an unsued variable, and corrected 2 glaring errors (missing 'case' in front of a label).
author Jack Jansen <jack.jansen@cwi.nl>
date Sat, 11 Aug 2001 21:54:11 +0000
parents 6f6f965c5e2d
children 379fc66f4c96
line wrap: on
line source


/* Return the full version string. */

#include "Python.h"

#include "patchlevel.h"

const char *
Py_GetVersion(void)
{
	static char version[250];
	sprintf(version, "%.80s (%.80s) %.80s", PY_VERSION,
		Py_GetBuildInfo(), Py_GetCompiler());
	return version;
}