[Bf-blender-cvs] [4b30b22] master: Fix for recent kdtree py module with MSVC
Campbell Barton
noreply at git.blender.org
Mon Jan 6 15:04:49 CET 2014
Commit: 4b30b22ecfd58cd57aa3dec478d644f0dc28e189
Author: Campbell Barton
Date: Tue Jan 7 00:53:52 2014 +1100
https://developer.blender.org/rB4b30b22ecfd58cd57aa3dec478d644f0dc28e189
Fix for recent kdtree py module with MSVC
also remove submodule includes from mathutils.h
===================================================================
M source/blender/python/mathutils/mathutils.c
M source/blender/python/mathutils/mathutils.h
M source/blender/python/mathutils/mathutils_geometry.c
M source/blender/python/mathutils/mathutils_geometry.h
M source/blender/python/mathutils/mathutils_kdtree.c
M source/blender/python/mathutils/mathutils_kdtree.h
M source/blender/python/mathutils/mathutils_noise.h
===================================================================
diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c
index dd3e5de..1ecb2c0 100644
--- a/source/blender/python/mathutils/mathutils.c
+++ b/source/blender/python/mathutils/mathutils.c
@@ -474,6 +474,12 @@ static struct PyModuleDef M_Mathutils_module_def = {
NULL, /* m_free */
};
+
+/* submodules only */
+#include "mathutils_geometry.h"
+#include "mathutils_kdtree.h"
+#include "mathutils_noise.h"
+
PyMODINIT_FUNC PyInit_mathutils(void)
{
PyObject *mod;
diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.h
index df1d570..4c057a1 100644
--- a/source/blender/python/mathutils/mathutils.h
+++ b/source/blender/python/mathutils/mathutils.h
@@ -55,10 +55,10 @@ typedef struct {
#include "mathutils_Euler.h"
#include "mathutils_Color.h"
-/* utility submodules */
-#include "mathutils_geometry.h"
-#include "mathutils_noise.h"
-#include "mathutils_kdtree.h"
+// /* utility submodules */
+//
+//
+//#include "mathutils_kdtree.h"
PyObject *BaseMathObject_owner_get(BaseMathObject *self, void *);
PyObject *BaseMathObject_is_wrapped_get(BaseMathObject *self, void *);
diff --git a/source/blender/python/mathutils/mathutils_geometry.c b/source/blender/python/mathutils/mathutils_geometry.c
index 29e7779..108ebfa 100644
--- a/source/blender/python/mathutils/mathutils_geometry.c
+++ b/source/blender/python/mathutils/mathutils_geometry.c
@@ -27,6 +27,7 @@
#include <Python.h>
+#include "mathutils.h"
#include "mathutils_geometry.h"
/* Used for PolyFill */
diff --git a/source/blender/python/mathutils/mathutils_geometry.h b/source/blender/python/mathutils/mathutils_geometry.h
index 8641a3f..7f6a1a3 100644
--- a/source/blender/python/mathutils/mathutils_geometry.h
+++ b/source/blender/python/mathutils/mathutils_geometry.h
@@ -27,8 +27,6 @@
* \ingroup pymathutils
*/
-#include "mathutils.h"
-
PyMODINIT_FUNC PyInit_mathutils_geometry(void);
#endif /* __MATHUTILS_GEOMETRY_H__ */
diff --git a/source/blender/python/mathutils/mathutils_kdtree.c b/source/blender/python/mathutils/mathutils_kdtree.c
index aa9c7ee..d48ab80 100644
--- a/source/blender/python/mathutils/mathutils_kdtree.c
+++ b/source/blender/python/mathutils/mathutils_kdtree.c
@@ -35,7 +35,9 @@
#include "BLI_kdtree.h"
#include "../generic/py_capi_utils.h"
+
#include "mathutils.h"
+#include "mathutils_kdtree.h" /* own include */
#include "BLI_strict_flags.h"
diff --git a/source/blender/python/mathutils/mathutils_kdtree.h b/source/blender/python/mathutils/mathutils_kdtree.h
index 8421661..33c0cbe 100644
--- a/source/blender/python/mathutils/mathutils_kdtree.h
+++ b/source/blender/python/mathutils/mathutils_kdtree.h
@@ -26,7 +26,7 @@
#ifndef __MATHUTILS_KDTREE_H__
#define __MATHUTILS_KDTREE_H__
-PyObject *PyInit_mathutils_kdtree(void);
+PyMODINIT_FUNC PyInit_mathutils_kdtree(void);
extern PyTypeObject PyKDTree_Type;
diff --git a/source/blender/python/mathutils/mathutils_noise.h b/source/blender/python/mathutils/mathutils_noise.h
index 2ed3e32..f2218b2 100644
--- a/source/blender/python/mathutils/mathutils_noise.h
+++ b/source/blender/python/mathutils/mathutils_noise.h
@@ -27,8 +27,6 @@
#ifndef __MATHUTILS_NOISE_H__
#define __MATHUTILS_NOISE_H__
-#include "mathutils.h"
-
PyMODINIT_FUNC PyInit_mathutils_noise(void);
PyMODINIT_FUNC PyInit_mathutils_noise_types(void);
PyMODINIT_FUNC PyInit_mathutils_noise_metrics(void);
More information about the Bf-blender-cvs
mailing list