view Python/getcompiler.c @ 84467:b8028f74bac4 3.3

Issue #18351: Fix various issues with importlib._bootstrap._get_sourcefile(). Thanks to its only use by the C API, it was never properly tested until now. Thanks to Neal Norwitz for discovering the bug and Madison May for the patch.
author Brett Cannon <brett@python.org>
date Sat, 06 Jul 2013 17:56:43 -0400
parents 4306107b1395
children
line wrap: on
line source


/* Return the compiler identification, if possible. */

#include "Python.h"

#ifndef COMPILER

#ifdef __GNUC__
#define COMPILER "\n[GCC " __VERSION__ "]"
#endif

#endif /* !COMPILER */

#ifndef COMPILER

#ifdef __cplusplus
#define COMPILER "[C++]"
#else
#define COMPILER "[C]"
#endif

#endif /* !COMPILER */

const char *
Py_GetCompiler(void)
{
	return COMPILER;
}