OLD | NEW |
1 %insert(runtime) %{ | 1 %insert(runtime) %{ |
2 /* Python.h has to appear first */ | 2 /* Python.h has to appear first */ |
3 // Resolve conflicting use of _DEBUG across projects. | 3 // Resolve conflicting use of _DEBUG across projects. |
4 // #defining _DEBUG causes Python.h to require pythonXX_d.lib (instead | 4 // #defining _DEBUG causes Python.h to require pythonXX_d.lib (instead |
5 // of pythonXX.lib). | 5 // of pythonXX.lib). |
6 // MSVC #defines _DEBUG for Debug configuration. | 6 // MSVC #defines _DEBUG for Debug configuration. |
7 // Make sure our project, which uses the latter, doesn't trigger the | 7 // Make sure our project, which uses the latter, doesn't trigger the |
8 // former since we don't want to debug python itself. | 8 // former since we don't want to debug python itself. |
9 // (http://old.nabble.com/problems-with-python24_d.lib-td4760095.html#a4760095) | 9 // (http://old.nabble.com/problems-with-python24_d.lib-td4760095.html#a4760095) |
| 10 // Also, disable a check in MSVC when building for Multi-threaded Debug DLL |
| 11 // that complains about mix of headers with and without _DEBUG. |
10 #ifdef _DEBUG | 12 #ifdef _DEBUG |
| 13 #if defined(_MSC_VER) && _MSC_VER >= 1400 |
| 14 #define _CRT_NOFORCE_MANIFEST 1 |
| 15 #endif |
11 #undef _DEBUG | 16 #undef _DEBUG |
12 #include <Python.h> | 17 #include <Python.h> |
13 #define _DEBUG | 18 #define _DEBUG |
14 #else | 19 #else |
15 #include <Python.h> | 20 #include <Python.h> |
16 #endif | 21 #endif |
17 %} | 22 %} |
18 | 23 |
19 %insert(runtime) "swigrun.swg"; /* SWIG API */ | 24 %insert(runtime) "swigrun.swg"; /* SWIG API */ |
20 %insert(runtime) "swigerrors.swg"; /* SWIG errors */ | 25 %insert(runtime) "swigerrors.swg"; /* SWIG errors */ |
21 %insert(runtime) "pyhead.swg"; /* Python includes and fixes */ | 26 %insert(runtime) "pyhead.swg"; /* Python includes and fixes */ |
22 %insert(runtime) "pyerrors.swg"; /* Python errors */ | 27 %insert(runtime) "pyerrors.swg"; /* Python errors */ |
23 %insert(runtime) "pythreads.swg"; /* Python thread code */ | 28 %insert(runtime) "pythreads.swg"; /* Python thread code */ |
24 %insert(runtime) "pyapi.swg"; /* Python API */ | 29 %insert(runtime) "pyapi.swg"; /* Python API */ |
25 %insert(runtime) "pyrun.swg"; /* Python run-time code */ | 30 %insert(runtime) "pyrun.swg"; /* Python run-time code */ |
26 | 31 |
OLD | NEW |