Permalink
Cannot retrieve contributors at this time
27 lines (21 sloc)
534 Bytes
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
cpython/Python/getcompiler.c
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Return the compiler identification, if possible. */ | |
| #include "Python.h" | |
| #ifndef COMPILER | |
| // Note the __clang__ conditional has to come before the __GNUC__ one because | |
| // clang pretends to be GCC. | |
| #if defined(__clang__) | |
| #define COMPILER "[Clang " __clang_version__ "]" | |
| #elif defined(__GNUC__) | |
| #define COMPILER "[GCC " __VERSION__ "]" | |
| // Generic fallbacks. | |
| #elif defined(__cplusplus) | |
| #define COMPILER "[C++]" | |
| #else | |
| #define COMPILER "[C]" | |
| #endif | |
| #endif /* !COMPILER */ | |
| const char * | |
| Py_GetCompiler(void) | |
| { | |
| return COMPILER; | |
| } |