Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-10-15 06:15:07 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-10-15 06:15:07 +0400
commit4d4664d98f49cfb171a43bd6ae6bb002b5f3c34b (patch)
treee458f200b0061c4adec3a0d5b8f7f523b647c036 /source/gameengine/Ketsji/KX_PythonInit.cpp
parent977aaeb95c2946f2c8d83dd6a15979424a869eda (diff)
code cleanup: check for msvc directly when using warning pragma's.
Diffstat (limited to 'source/gameengine/Ketsji/KX_PythonInit.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_PythonInit.cpp58
1 files changed, 26 insertions, 32 deletions
diff --git a/source/gameengine/Ketsji/KX_PythonInit.cpp b/source/gameengine/Ketsji/KX_PythonInit.cpp
index 43fca40f2da..89799d065a4 100644
--- a/source/gameengine/Ketsji/KX_PythonInit.cpp
+++ b/source/gameengine/Ketsji/KX_PythonInit.cpp
@@ -30,54 +30,48 @@
* \ingroup ketsji
*/
-
#include "GL/glew.h"
-#if defined(WIN32) && !defined(FREE_WINDOWS)
-#pragma warning (disable : 4786)
-#endif //WIN32
-
-#ifdef WITH_PYTHON
-
-#ifdef _POSIX_C_SOURCE
-#undef _POSIX_C_SOURCE
-#endif
-
-#ifdef _XOPEN_SOURCE
-#undef _XOPEN_SOURCE
+#ifdef _MSC_VER
+# pragma warning (disable:4786)
#endif
-#if defined(__sun) || defined(sun)
-#if defined(_XPG4)
-#undef _XPG4
-#endif
-#endif
-
-#include <Python.h>
+#ifdef WITH_PYTHON
+# ifdef _POSIX_C_SOURCE
+# undef _POSIX_C_SOURCE
+# endif
+# ifdef _XOPEN_SOURCE
+# undef _XOPEN_SOURCE
+# endif
+# if defined(__sun) || defined(sun)
+# if defined(_XPG4)
+# undef _XPG4
+# endif
+# endif
+# include <Python.h>
extern "C" {
- #include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
- #include "py_capi_utils.h"
- #include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use.
- #include "bgl.h"
- #include "blf_py_api.h"
+ # include "bpy_internal_import.h" /* from the blender python api, but we want to import text too! */
+ # include "py_capi_utils.h"
+ # include "mathutils.h" // 'mathutils' module copied here so the blenderlayer can use.
+ # include "bgl.h"
+ # include "blf_py_api.h"
- #include "marshal.h" /* python header for loading/saving dicts */
+ # include "marshal.h" /* python header for loading/saving dicts */
}
-
#include "AUD_PyInit.h"
-#endif
+#endif /* WITH_PYTHON */
#include "KX_PythonInit.h"
// directory header for py function getBlendFileList
#ifndef WIN32
- #include <dirent.h>
- #include <stdlib.h>
+# include <dirent.h>
+# include <stdlib.h>
#else
- #include <io.h>
- #include "BLI_winstuff.h"
+# include <io.h>
+# include "BLI_winstuff.h"
#endif
//python physics binding