diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2015-07-22 02:51:24 -0700 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2015-07-22 02:51:24 -0700 |
commit | c065026ebd2514d3a23a96e61938420f34068ad1 (patch) | |
tree | 5f605ad9ddf6079fcf639e07cd1b93341634a614 /Cython/Utility/ModuleSetupCode.c | |
parent | 45655daed0c23d0be43c4c96661bcd168ed8eae6 (diff) | |
download | cython-c065026ebd2514d3a23a96e61938420f34068ad1.tar.gz |
More explicit warning when C++ compiler not used for C++ Cython file.
Now that we split CInitCode and CppInitCode, we no longer generate
valid C code even if C++ features are not used.
Diffstat (limited to 'Cython/Utility/ModuleSetupCode.c')
-rw-r--r-- | Cython/Utility/ModuleSetupCode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Utility/ModuleSetupCode.c b/Cython/Utility/ModuleSetupCode.c index 79e089975..06c18f2da 100644 --- a/Cython/Utility/ModuleSetupCode.c +++ b/Cython/Utility/ModuleSetupCode.c @@ -234,6 +234,10 @@ typedef struct { /////////////// CppInitCode /////////////// +#ifndef __cplusplus + #error "Cython files generated with the C++ option must be compiled with a C++ compiler." +#endif + // inline attribute #ifndef CYTHON_INLINE #define CYTHON_INLINE inline |