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-03-24 05:24:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-24 05:24:58 +0400
commit3c11379e26b1aad399ecd0afc4d23df12b24f3cd (patch)
tree0a549fceeaf261e9ca0900711e99f35f6b2b0c24
parent0c898514f0b1536e1b335f24a1408f70c0162c48 (diff)
code cleanup: move bmesh inline funcs to headers (avoids compiling the C files).
-rw-r--r--source/blender/blenkernel/intern/cdderivedmesh.c10
-rw-r--r--source/blender/blenlib/BLI_math_inline.h29
-rw-r--r--source/blender/bmesh/CMakeLists.txt6
-rw-r--r--source/blender/bmesh/bmesh.h9
-rw-r--r--source/blender/bmesh/intern/bmesh_inline.h (renamed from source/blender/bmesh/intern/bmesh_inline.c)10
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_iterators_inline.h (renamed from source/blender/bmesh/intern/bmesh_iterators_inline.c)10
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_conv.c9
-rw-r--r--source/blender/bmesh/intern/bmesh_mesh_validate.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c2
-rw-r--r--source/blender/bmesh/intern/bmesh_operator_api_inline.h (renamed from source/blender/bmesh/intern/bmesh_operator_api_inline.c)11
-rw-r--r--source/blender/bmesh/intern/bmesh_operators.h2
-rw-r--r--source/blender/bmesh/intern/bmesh_structure.c4
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers.c1
-rw-r--r--source/blender/bmesh/intern/bmesh_walkers_impl.c4
-rw-r--r--source/blender/bmesh/operators/bmo_connect.c6
-rw-r--r--source/blender/bmesh/operators/bmo_edgesplit.c2
-rw-r--r--source/blender/bmesh/tools/BME_bevel.c7
-rw-r--r--source/blender/editors/transform/transform_conversions.c12
-rw-r--r--source/blender/editors/transform/transform_generics.c10
-rw-r--r--source/blender/editors/transform/transform_manipulator.c6
-rw-r--r--source/blender/editors/transform/transform_orientations.c7
-rw-r--r--source/blender/editors/util/crazyspace.c6
-rw-r--r--source/blender/makesrna/intern/rna_object.c2
-rw-r--r--source/blender/python/bmesh/bmesh_py_api.c4
-rw-r--r--source/blender/python/bmesh/bmesh_py_types_select.c6
-rw-r--r--source/blender/python/bmesh/bmesh_py_utils.c8
28 files changed, 93 insertions, 95 deletions
diff --git a/source/blender/blenkernel/intern/cdderivedmesh.c b/source/blender/blenkernel/intern/cdderivedmesh.c
index 3fef7813408..7b0baf6556a 100644
--- a/source/blender/blenkernel/intern/cdderivedmesh.c
+++ b/source/blender/blenkernel/intern/cdderivedmesh.c
@@ -36,13 +36,6 @@
#include "GL/glew.h"
-#include "BKE_cdderivedmesh.h"
-#include "BKE_global.h"
-#include "BKE_mesh.h"
-#include "BKE_paint.h"
-#include "BKE_utildefines.h"
-#include "BKE_tessmesh.h"
-
#include "BLI_scanfill.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
@@ -57,7 +50,8 @@
#include "BKE_global.h"
#include "BKE_mesh.h"
#include "BKE_paint.h"
-
+#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
diff --git a/source/blender/blenlib/BLI_math_inline.h b/source/blender/blenlib/BLI_math_inline.h
index fcc5fb744bb..ce43d5fb941 100644
--- a/source/blender/blenlib/BLI_math_inline.h
+++ b/source/blender/blenlib/BLI_math_inline.h
@@ -38,21 +38,21 @@ extern "C" {
#define __BLI_MATH_INLINE_H__
#ifdef __BLI_MATH_INLINE_H__
-#ifdef _MSC_VER
-#define MINLINE static __forceinline
-#define MALWAYS_INLINE MINLINE
+# ifdef _MSC_VER
+# define MINLINE static __forceinline
+# define MALWAYS_INLINE MINLINE
+# else
+# define MINLINE static inline
+# if (defined(__APPLE__) && defined(__ppc__))
+ /* static inline __attribute__ here breaks osx ppc gcc42 build */
+# define MALWAYS_INLINE static __attribute__((always_inline))
+# else
+# define MALWAYS_INLINE static inline __attribute__((always_inline))
+# endif
+# endif
#else
-#define MINLINE static inline
-#if (defined(__APPLE__) && defined(__ppc__))
-/* static inline __attribute__ here breaks osx ppc gcc42 build */
-#define MALWAYS_INLINE static __attribute__((always_inline))
-#else
-#define MALWAYS_INLINE static inline __attribute__((always_inline))
-#endif
-#endif
-#else
-#define MINLINE
-#define MALWAYS_INLINE
+# define MINLINE
+# define MALWAYS_INLINE
#endif
#ifdef __cplusplus
@@ -60,4 +60,3 @@ extern "C" {
#endif
#endif /* __BLI_MATH_INLINE_H__ */
-
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index eaa0df49382..3dc10c5f97f 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -56,12 +56,12 @@ set(SRC
intern/bmesh_construct.h
intern/bmesh_core.c
intern/bmesh_core.h
- intern/bmesh_inline.c
+ intern/bmesh_inline.h
intern/bmesh_interp.c
intern/bmesh_interp.h
intern/bmesh_iterators.c
intern/bmesh_iterators.h
- intern/bmesh_iterators_inline.c
+ intern/bmesh_iterators_inline.h
intern/bmesh_marking.c
intern/bmesh_marking.h
intern/bmesh_mesh.c
@@ -73,7 +73,7 @@ set(SRC
intern/bmesh_mods.c
intern/bmesh_mods.h
intern/bmesh_opdefines.c
- intern/bmesh_operator_api_inline.c
+ intern/bmesh_operator_api_inline.h
intern/bmesh_operators.c
intern/bmesh_operators.h
intern/bmesh_operators_private.h
diff --git a/source/blender/bmesh/bmesh.h b/source/blender/bmesh/bmesh.h
index a7f66bb8345..81bd164fbdf 100644
--- a/source/blender/bmesh/bmesh.h
+++ b/source/blender/bmesh/bmesh.h
@@ -198,11 +198,11 @@
extern "C" {
#endif
-#include "DNA_listBase.h"
-#include "DNA_customdata_types.h"
+#include "DNA_listBase.h" /* selection history uses */
+#include "DNA_customdata_types.h" /* BMesh struct in bmesh_class.h uses */
#include <stdlib.h>
-#include "BLI_utildefines.h"
+// #include "BLI_utildefines.h"
#include "bmesh_class.h"
@@ -224,8 +224,7 @@ extern "C" {
#include "intern/bmesh_queries.h"
#include "intern/bmesh_walkers.h"
-#include "intern/bmesh_inline.c"
-#include "intern/bmesh_operator_api_inline.c"
+#include "intern/bmesh_inline.h"
#ifdef __cplusplus
}
diff --git a/source/blender/bmesh/intern/bmesh_inline.c b/source/blender/bmesh/intern/bmesh_inline.h
index c9e4875866a..6b529326607 100644
--- a/source/blender/bmesh/intern/bmesh_inline.c
+++ b/source/blender/bmesh/intern/bmesh_inline.h
@@ -20,16 +20,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/intern/bmesh_inline.c
+/** \file blender/bmesh/intern/bmesh_inline.h
* \ingroup bmesh
*
* BM Inline functions.
*/
-#ifndef __BMESH_INLINE_C__
-#define __BMESH_INLINE_C__
-
-#include "bmesh.h"
+#ifndef __BMESH_INLINE_H__
+#define __BMESH_INLINE_H__
/* stuff for dealing with header flags */
#define BM_elem_flag_test( ele, hflag) _bm_elem_flag_test (&(ele)->head, hflag)
@@ -113,4 +111,4 @@ BLI_INLINE int _bm_elem_index_get(const BMHeader *head)
return head->index;
}
-#endif /* __BMESH_INLINE_C__ */
+#endif /* __BMESH_INLINE_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_iterators.c b/source/blender/bmesh/intern/bmesh_iterators.c
index e58e989c41f..b53896ae722 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.c
+++ b/source/blender/bmesh/intern/bmesh_iterators.c
@@ -28,6 +28,7 @@
* See: bmesh_iterators_inlin.c too, some functions are here for speed reasons.
*/
+#include "BLI_utildefines.h"
#include "bmesh.h"
#include "intern/bmesh_private.h"
diff --git a/source/blender/bmesh/intern/bmesh_iterators.h b/source/blender/bmesh/intern/bmesh_iterators.h
index 7b13d2de723..d3566d8aead 100644
--- a/source/blender/bmesh/intern/bmesh_iterators.h
+++ b/source/blender/bmesh/intern/bmesh_iterators.h
@@ -143,6 +143,6 @@ void *bmiter__edge_of_face_step(struct BMIter *iter);
void bmiter__loop_of_face_begin(struct BMIter *iter);
void *bmiter__loop_of_face_step(struct BMIter *iter);
-#include "intern/bmesh_iterators_inline.c"
+#include "intern/bmesh_iterators_inline.h"
#endif /* __BMESH_ITERATORS_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_iterators_inline.c b/source/blender/bmesh/intern/bmesh_iterators_inline.h
index bb16fcc439c..57f0da4081b 100644
--- a/source/blender/bmesh/intern/bmesh_iterators_inline.c
+++ b/source/blender/bmesh/intern/bmesh_iterators_inline.h
@@ -20,16 +20,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/intern/bmesh_iterators_inline.c
+/** \file blender/bmesh/intern/bmesh_iterators_inline.h
* \ingroup bmesh
*
* BMesh inline iterator functions.
*/
-#ifndef __BMESH_ITERATORS_INLINE_C__
-#define __BMESH_ITERATORS_INLINE_C__
-
-#include "bmesh.h"
+#ifndef __BMESH_ITERATORS_INLINE_H__
+#define __BMESH_ITERATORS_INLINE_H__
/* inline here optimizes out the switch statement when called with
* constant values (which is very common), nicer for loop-in-loop situations */
@@ -189,4 +187,4 @@ BLI_INLINE void *BM_iter_new(BMIter *iter, BMesh *bm, const char itype, void *da
}
}
-#endif /* __BMESH_ITERATORS_INLINE_C__ */
+#endif /* __BMESH_ITERATORS_INLINE_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_mesh_conv.c b/source/blender/bmesh/intern/bmesh_mesh_conv.c
index 16214d5fbb4..1e478b9b4a8 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_conv.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_conv.c
@@ -26,16 +26,14 @@
* BM mesh conversion functions.
*/
-
-#include "bmesh.h"
-#include "intern/bmesh_private.h" /* for element checking */
-
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_object_types.h"
#include "DNA_modifier_types.h"
#include "DNA_key_types.h"
+#include "MEM_guardedalloc.h"
+
#include "BLI_listbase.h"
#include "BLI_array.h"
#include "BLI_math_vector.h"
@@ -46,7 +44,8 @@
#include "BKE_global.h" /* ugh - for looping over all objects */
#include "BKE_main.h"
-#include "MEM_guardedalloc.h"
+#include "bmesh.h"
+#include "intern/bmesh_private.h" /* for element checking */
/* Mesh -> BMesh */
void BM_mesh_bm_from_me(BMesh *bm, Mesh *me, int set_key, int act_key_nr)
diff --git a/source/blender/bmesh/intern/bmesh_mesh_validate.c b/source/blender/bmesh/intern/bmesh_mesh_validate.c
index aa49a8405d7..0ec13f1df8f 100644
--- a/source/blender/bmesh/intern/bmesh_mesh_validate.c
+++ b/source/blender/bmesh/intern/bmesh_mesh_validate.c
@@ -32,6 +32,8 @@
/* debug builds only */
#ifdef DEBUG
+#include "BLI_utildefines.h"
+
#include "bmesh.h"
#include "bmesh_mesh_validate.h"
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index cf114d3475f..5162932ea1b 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -54,6 +54,8 @@
*
*/
+#include "BLI_utildefines.h"
+
#include "bmesh.h"
#include "intern/bmesh_private.h"
diff --git a/source/blender/bmesh/intern/bmesh_operator_api_inline.c b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
index 91fc3b1e4ca..268736cfe0e 100644
--- a/source/blender/bmesh/intern/bmesh_operator_api_inline.c
+++ b/source/blender/bmesh/intern/bmesh_operator_api_inline.h
@@ -20,17 +20,14 @@
* ***** END GPL LICENSE BLOCK *****
*/
-/** \file blender/bmesh/intern/bmesh_operator_api_inline.c
+/** \file blender/bmesh/intern/bmesh_operator_api_inline.h
* \ingroup bmesh
*
* BMesh inline operator functions.
*/
-#ifndef __BMESH_OPERATOR_API_INLINE_C__
-#define __BMESH_OPERATOR_API_INLINE_C__
-
-#include "bmesh.h"
-
+#ifndef __BMESH_OPERATOR_API_INLINE_H__
+#define __BMESH_OPERATOR_API_INLINE_H__
/* tool flag API. never, ever ever should tool code put junk in
* header flags (element->head.flag), nor should they use
@@ -146,4 +143,4 @@ BLI_INLINE void *BMO_slot_map_ptr_get(BMesh *bm, BMOperator *op, const char *slo
return NULL;
}
-#endif /* __BMESH_OPERATOR_API_INLINE_C__ */
+#endif /* __BMESH_OPERATOR_API_INLINE_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_operators.h b/source/blender/bmesh/intern/bmesh_operators.h
index 52525dab51b..af62e4d2b29 100644
--- a/source/blender/bmesh/intern/bmesh_operators.h
+++ b/source/blender/bmesh/intern/bmesh_operators.h
@@ -94,4 +94,6 @@ void BM_mesh_esubdivideflag(struct Object *obedit, BMesh *bm, int flag, float sm
float fractal, int beauty, int numcuts, int seltype,
int cornertype, int singleedge, int gridfill, int seed);
+#include "intern/bmesh_operator_api_inline.h"
+
#endif /* __BMESH_OPERATORS_H__ */
diff --git a/source/blender/bmesh/intern/bmesh_structure.c b/source/blender/bmesh/intern/bmesh_structure.c
index eca90e8e7f2..27815551a87 100644
--- a/source/blender/bmesh/intern/bmesh_structure.c
+++ b/source/blender/bmesh/intern/bmesh_structure.c
@@ -31,11 +31,11 @@
* Low level routines for manipulating the BM structure.
*/
+#include "BLI_utildefines.h"
+
#include "bmesh.h"
#include "intern/bmesh_private.h"
-#include <stdlib.h>
-
/**
* MISC utility functions.
*/
diff --git a/source/blender/bmesh/intern/bmesh_walkers.c b/source/blender/bmesh/intern/bmesh_walkers.c
index bf646827a51..69ab7a91232 100644
--- a/source/blender/bmesh/intern/bmesh_walkers.c
+++ b/source/blender/bmesh/intern/bmesh_walkers.c
@@ -29,6 +29,7 @@
#include <stdlib.h>
#include <string.h> /* for memcpy */
+#include "BLI_utildefines.h"
#include "BLI_listbase.h"
#include "bmesh.h"
diff --git a/source/blender/bmesh/intern/bmesh_walkers_impl.c b/source/blender/bmesh/intern/bmesh_walkers_impl.c
index b361a0d051d..d996d756bdc 100644
--- a/source/blender/bmesh/intern/bmesh_walkers_impl.c
+++ b/source/blender/bmesh/intern/bmesh_walkers_impl.c
@@ -26,11 +26,13 @@
* BMesh Walker Code.
*/
+#include "BLI_utildefines.h"
+
#include "BKE_customdata.h"
#include "bmesh.h"
#include "intern/bmesh_private.h"
-#include "bmesh_walkers_private.h"
+#include "intern/bmesh_walkers_private.h"
/**
* Shell Walker:
diff --git a/source/blender/bmesh/operators/bmo_connect.c b/source/blender/bmesh/operators/bmo_connect.c
index 708fe2f5193..e135473fc7e 100644
--- a/source/blender/bmesh/operators/bmo_connect.c
+++ b/source/blender/bmesh/operators/bmo_connect.c
@@ -22,11 +22,11 @@
#include "MEM_guardedalloc.h"
-
-#include "bmesh.h"
-
#include "BLI_math.h"
#include "BLI_array.h"
+#include "BLI_utildefines.h"
+
+#include "bmesh.h"
#define VERT_INPUT 1
#define EDGE_OUT 1
diff --git a/source/blender/bmesh/operators/bmo_edgesplit.c b/source/blender/bmesh/operators/bmo_edgesplit.c
index b21082c42bf..0da44dcf9d4 100644
--- a/source/blender/bmesh/operators/bmo_edgesplit.c
+++ b/source/blender/bmesh/operators/bmo_edgesplit.c
@@ -22,6 +22,8 @@
#include "MEM_guardedalloc.h"
+#include "BLI_utildefines.h"
+
#include "bmesh.h"
#include "intern/bmesh_operators_private.h" /* own include */
diff --git a/source/blender/bmesh/tools/BME_bevel.c b/source/blender/bmesh/tools/BME_bevel.c
index 139176e5276..78d02ee387a 100644
--- a/source/blender/bmesh/tools/BME_bevel.c
+++ b/source/blender/bmesh/tools/BME_bevel.c
@@ -33,14 +33,15 @@
#include "DNA_meshdata_types.h"
#include "DNA_mesh_types.h"
-#include "BKE_utildefines.h"
-#include "BKE_tessmesh.h"
-#include "BKE_bmesh.h"
#include "BLI_math.h"
#include "BLI_blenlib.h"
#include "BLI_ghash.h"
#include "BLI_memarena.h"
+#include "BKE_utildefines.h"
+#include "BKE_tessmesh.h"
+#include "BKE_bmesh.h"
+
#include "bmesh.h"
#include "intern/bmesh_private.h"
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index 20a51945b95..1c1fea9f505 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -56,6 +56,12 @@
#include "MEM_guardedalloc.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_array.h"
+#include "BLI_utildefines.h"
+#include "BLI_smallhash.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_action.h"
#include "BKE_armature.h"
@@ -103,12 +109,6 @@
#include "UI_view2d.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_array.h"
-#include "BLI_utildefines.h"
-#include "BLI_smallhash.h"
-
#include "RNA_access.h"
#include "transform.h"
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index fa0c0883f01..350d2365511 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -50,6 +50,11 @@
#include "DNA_modifier_types.h"
#include "DNA_movieclip_types.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_rand.h"
+#include "BLI_utildefines.h"
+
#include "RNA_access.h"
//#include "BIF_screen.h"
@@ -91,11 +96,6 @@
//#include "BDR_unwrapper.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_rand.h"
-#include "BLI_utildefines.h"
-
#include "WM_types.h"
#include "WM_api.h"
diff --git a/source/blender/editors/transform/transform_manipulator.c b/source/blender/editors/transform/transform_manipulator.c
index c9dfd3464d9..6eba3d7bd0a 100644
--- a/source/blender/editors/transform/transform_manipulator.c
+++ b/source/blender/editors/transform/transform_manipulator.c
@@ -52,6 +52,9 @@
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
+#include "BLI_math.h"
+#include "BLI_utildefines.h"
+
#include "RNA_access.h"
#include "BKE_action.h"
@@ -63,9 +66,6 @@
#include "BKE_pointcache.h"
#include "BKE_tessmesh.h"
-#include "BLI_math.h"
-#include "BLI_utildefines.h"
-
#include "BIF_gl.h"
#include "WM_api.h"
diff --git a/source/blender/editors/transform/transform_orientations.c b/source/blender/editors/transform/transform_orientations.c
index 10f1e34d6e7..6b68042444e 100644
--- a/source/blender/editors/transform/transform_orientations.c
+++ b/source/blender/editors/transform/transform_orientations.c
@@ -38,6 +38,9 @@
#include "DNA_screen_types.h"
#include "DNA_view3d_types.h"
+#include "BLI_math.h"
+#include "BLI_blenlib.h"
+#include "BLI_utildefines.h"
#include "BKE_armature.h"
#include "BKE_curve.h"
@@ -45,10 +48,6 @@
#include "BKE_tessmesh.h"
#include "BKE_report.h"
-#include "BLI_math.h"
-#include "BLI_blenlib.h"
-#include "BLI_utildefines.h"
-
#include "BLF_translation.h"
//#include "BIF_editmesh.h"
diff --git a/source/blender/editors/util/crazyspace.c b/source/blender/editors/util/crazyspace.c
index 06309293f9a..544a1c77d50 100644
--- a/source/blender/editors/util/crazyspace.c
+++ b/source/blender/editors/util/crazyspace.c
@@ -38,15 +38,15 @@
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
+#include "BLI_utildefines.h"
+#include "BLI_math.h"
+
#include "BKE_DerivedMesh.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_mesh.h"
#include "BKE_tessmesh.h"
-#include "BLI_utildefines.h"
-#include "BLI_math.h"
-
#include "ED_util.h"
typedef struct {
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index f334179beb2..0e7df0df8ad 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -46,6 +46,8 @@
#include "DNA_scene_types.h"
#include "DNA_meta_types.h"
+#include "BLI_utildefines.h"
+
#include "BKE_tessmesh.h"
#include "BKE_group.h" /* needed for object_in_group() */
diff --git a/source/blender/python/bmesh/bmesh_py_api.c b/source/blender/python/bmesh/bmesh_py_api.c
index 23a3f6ed5c0..77276df49f2 100644
--- a/source/blender/python/bmesh/bmesh_py_api.c
+++ b/source/blender/python/bmesh/bmesh_py_api.c
@@ -31,6 +31,8 @@
#include <Python.h>
+#include "BLI_utildefines.h"
+
#include "bmesh.h"
#include "bmesh_py_types.h"
@@ -40,8 +42,6 @@
#include "bmesh_py_utils.h"
-#include "BLI_utildefines.h"
-
#include "BKE_tessmesh.h"
#include "DNA_mesh_types.h"
diff --git a/source/blender/python/bmesh/bmesh_py_types_select.c b/source/blender/python/bmesh/bmesh_py_types_select.c
index bf0e70c7ac1..4f3501944b0 100644
--- a/source/blender/python/bmesh/bmesh_py_types_select.c
+++ b/source/blender/python/bmesh/bmesh_py_types_select.c
@@ -35,14 +35,14 @@
#include <Python.h>
+#include "BLI_utildefines.h"
+#include "BLI_listbase.h"
+
#include "bmesh.h"
#include "bmesh_py_types.h"
#include "bmesh_py_types_select.h"
-#include "BLI_utildefines.h"
-#include "BLI_listbase.h"
-
#include "BKE_tessmesh.h"
#include "DNA_mesh_types.h"
diff --git a/source/blender/python/bmesh/bmesh_py_utils.c b/source/blender/python/bmesh/bmesh_py_utils.c
index 736802c7f60..bbec871a44b 100644
--- a/source/blender/python/bmesh/bmesh_py_utils.c
+++ b/source/blender/python/bmesh/bmesh_py_utils.c
@@ -32,14 +32,14 @@
#include <Python.h>
-#include "bmesh.h"
-
-#include "bmesh_py_types.h"
-
#include "BLI_utildefines.h"
#include "MEM_guardedalloc.h"
+#include "bmesh.h"
+
+#include "bmesh_py_types.h"
+
#include "bmesh_py_utils.h" /* own include */