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. |
| 4 // #defining _DEBUG causes Python.h to require pythonXX_d.lib (instead |
| 5 // of pythonXX.lib). |
| 6 // MSVC #defines _DEBUG for Debug configuration. |
| 7 // Make sure our project, which uses the latter, doesn't trigger the |
| 8 // former since we don't want to debug python itself. |
| 9 // (http://old.nabble.com/problems-with-python24_d.lib-td4760095.html#a4760095) |
| 10 #ifdef _DEBUG |
| 11 #undef _DEBUG |
3 #include <Python.h> | 12 #include <Python.h> |
| 13 #define _DEBUG |
| 14 #else |
| 15 #include <Python.h> |
| 16 #endif |
4 %} | 17 %} |
5 | 18 |
6 %insert(runtime) "swigrun.swg"; /* SWIG API */ | 19 %insert(runtime) "swigrun.swg"; /* SWIG API */ |
7 %insert(runtime) "swigerrors.swg"; /* SWIG errors */ | 20 %insert(runtime) "swigerrors.swg"; /* SWIG errors */ |
8 %insert(runtime) "pyhead.swg"; /* Python includes and fixes */ | 21 %insert(runtime) "pyhead.swg"; /* Python includes and fixes */ |
9 %insert(runtime) "pyerrors.swg"; /* Python errors */ | 22 %insert(runtime) "pyerrors.swg"; /* Python errors */ |
10 %insert(runtime) "pythreads.swg"; /* Python thread code */ | 23 %insert(runtime) "pythreads.swg"; /* Python thread code */ |
11 %insert(runtime) "pyapi.swg"; /* Python API */ | 24 %insert(runtime) "pyapi.swg"; /* Python API */ |
12 %insert(runtime) "pyrun.swg"; /* Python run-time code */ | 25 %insert(runtime) "pyrun.swg"; /* Python run-time code */ |
13 | 26 |
OLD | NEW |