view Python/getversion.c @ 21270:97709fd8fda0 legacy-trunk

Fix for SF bug #489671 (Neil Norwitz): memory leak in test_richcmp. Had nothing to do with rich comparisons -- some stack cleanup code was lost as a result of merging in Neil Schemenauer's generators patch. Reinserted the stack cleanup code, skipping it when yielding.
author Guido van Rossum <guido@python.org>
date Thu, 06 Dec 2001 21:28:18 +0000
parents 379fc66f4c96
children 9f2fbee420da
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];
	PyOS_snprintf(version, sizeof(version), "%.80s (%.80s) %.80s", 
		      PY_VERSION, Py_GetBuildInfo(), Py_GetCompiler());
	return version;
}