From 4b30b22ecfd58cd57aa3dec478d644f0dc28e189 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 7 Jan 2014 00:53:52 +1100 Subject: Fix for recent kdtree py module with MSVC also remove submodule includes from mathutils.h --- source/blender/python/mathutils/mathutils.c | 6 ++++++ source/blender/python/mathutils/mathutils.h | 8 ++++---- source/blender/python/mathutils/mathutils_geometry.c | 1 + source/blender/python/mathutils/mathutils_geometry.h | 2 -- source/blender/python/mathutils/mathutils_kdtree.c | 2 ++ source/blender/python/mathutils/mathutils_kdtree.h | 2 +- source/blender/python/mathutils/mathutils_noise.h | 2 -- 7 files changed, 14 insertions(+), 9 deletions(-) (limited to 'source/blender/python/mathutils') diff --git a/source/blender/python/mathutils/mathutils.c b/source/blender/python/mathutils/mathutils.c index dd3e5dec8a4..1ecb2c08bc1 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 df1d5704190..4c057a14461 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 29e7779b89a..108ebfa3a94 100644 --- a/source/blender/python/mathutils/mathutils_geometry.c +++ b/source/blender/python/mathutils/mathutils_geometry.c @@ -27,6 +27,7 @@ #include +#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 8641a3f7758..7f6a1a3887f 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 aa9c7eecc6b..d48ab803740 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 84216617712..33c0cbe23fd 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 2ed3e32f4f1..f2218b28f8f 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); -- cgit v1.2.3