From 4fac7828e4f731b4f44a48438c3d97d746d584bf Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 24 Sep 2024 12:56:16 +0200 Subject: [PATCH] Refactor: Move BPY `mathutils` headers to proper C++ ones. This module actually was confusing, since only a few headers were effectively still C ones (using the `extern "C"` blocks)... --- .../freestyle/intern/python/BPy_Convert.h | 2 +- .../blender/python/bmesh/bmesh_py_geometry.cc | 2 +- .../blender/python/bmesh/bmesh_py_ops_call.cc | 2 +- source/blender/python/bmesh/bmesh_py_types.cc | 2 +- .../python/bmesh/bmesh_py_types_customdata.cc | 2 +- .../python/bmesh/bmesh_py_types_meshdata.cc | 2 +- source/blender/python/bmesh/bmesh_py_utils.cc | 2 +- .../blender/python/gpu/gpu_py_framebuffer.cc | 2 +- source/blender/python/gpu/gpu_py_matrix.cc | 2 +- source/blender/python/gpu/gpu_py_offscreen.cc | 2 +- source/blender/python/gpu/gpu_py_shader.cc | 2 +- source/blender/python/intern/bpy_interface.cc | 2 +- source/blender/python/intern/bpy_msgbus.cc | 2 +- source/blender/python/intern/bpy_rna.cc | 2 +- source/blender/python/intern/bpy_rna_array.cc | 2 +- .../blender/python/mathutils/CMakeLists.txt | 22 +++++++++---------- source/blender/python/mathutils/mathutils.cc | 12 +++++----- .../mathutils/{mathutils.h => mathutils.hh} | 16 +++++++------- .../python/mathutils/mathutils_Color.cc | 2 +- .../{mathutils_Color.h => mathutils_Color.hh} | 4 ++-- .../python/mathutils/mathutils_Euler.cc | 2 +- .../{mathutils_Euler.h => mathutils_Euler.hh} | 5 ++--- .../python/mathutils/mathutils_Matrix.cc | 2 +- ...mathutils_Matrix.h => mathutils_Matrix.hh} | 4 ++-- .../python/mathutils/mathutils_Quaternion.cc | 2 +- ...s_Quaternion.h => mathutils_Quaternion.hh} | 4 ++-- .../python/mathutils/mathutils_Vector.cc | 2 +- ...mathutils_Vector.h => mathutils_Vector.hh} | 12 ++-------- .../python/mathutils/mathutils_bvhtree.cc | 4 ++-- ...thutils_bvhtree.h => mathutils_bvhtree.hh} | 2 +- .../python/mathutils/mathutils_geometry.cc | 4 ++-- ...utils_geometry.h => mathutils_geometry.hh} | 2 +- .../python/mathutils/mathutils_interpolate.cc | 4 ++-- ...interpolate.h => mathutils_interpolate.hh} | 2 +- .../python/mathutils/mathutils_kdtree.cc | 4 ++-- ...mathutils_kdtree.h => mathutils_kdtree.hh} | 2 +- .../python/mathutils/mathutils_noise.cc | 4 ++-- .../{mathutils_noise.h => mathutils_noise.hh} | 2 +- 38 files changed, 70 insertions(+), 79 deletions(-) rename source/blender/python/mathutils/{mathutils.h => mathutils.hh} (97%) rename source/blender/python/mathutils/{mathutils_Color.h => mathutils_Color.hh} (97%) rename source/blender/python/mathutils/{mathutils_Euler.h => mathutils_Euler.hh} (97%) rename source/blender/python/mathutils/{mathutils_Matrix.h => mathutils_Matrix.hh} (99%) rename source/blender/python/mathutils/{mathutils_Quaternion.h => mathutils_Quaternion.hh} (96%) rename source/blender/python/mathutils/{mathutils_Vector.h => mathutils_Vector.hh} (93%) rename source/blender/python/mathutils/{mathutils_bvhtree.h => mathutils_bvhtree.hh} (87%) rename source/blender/python/mathutils/{mathutils_geometry.h => mathutils_geometry.hh} (76%) rename source/blender/python/mathutils/{mathutils_interpolate.h => mathutils_interpolate.hh} (75%) rename source/blender/python/mathutils/{mathutils_kdtree.h => mathutils_kdtree.hh} (80%) rename source/blender/python/mathutils/{mathutils_noise.h => mathutils_noise.hh} (77%) diff --git a/source/blender/freestyle/intern/python/BPy_Convert.h b/source/blender/freestyle/intern/python/BPy_Convert.h index 96b3b9e5e56..72b5ffd0eb4 100644 --- a/source/blender/freestyle/intern/python/BPy_Convert.h +++ b/source/blender/freestyle/intern/python/BPy_Convert.h @@ -68,7 +68,7 @@ extern "C" { /////////////////////////////////////////////////////////////////////////////////////////// #include "generic/python_utildefines.h" -#include "mathutils/mathutils.h" +#include "mathutils/mathutils.hh" //============================== // C++ => Python diff --git a/source/blender/python/bmesh/bmesh_py_geometry.cc b/source/blender/python/bmesh/bmesh_py_geometry.cc index d383c8cd482..1d978591f12 100644 --- a/source/blender/python/bmesh/bmesh_py_geometry.cc +++ b/source/blender/python/bmesh/bmesh_py_geometry.cc @@ -13,7 +13,7 @@ #include "BLI_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "bmesh.hh" #include "bmesh_py_geometry.h" /* own include */ diff --git a/source/blender/python/bmesh/bmesh_py_ops_call.cc b/source/blender/python/bmesh/bmesh_py_ops_call.cc index ff5c2d7785f..839dca61578 100644 --- a/source/blender/python/bmesh/bmesh_py_ops_call.cc +++ b/source/blender/python/bmesh/bmesh_py_ops_call.cc @@ -14,7 +14,7 @@ #include "BLI_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "bmesh.hh" diff --git a/source/blender/python/bmesh/bmesh_py_types.cc b/source/blender/python/bmesh/bmesh_py_types.cc index 91dc6e06440..ee3ac8dc95e 100644 --- a/source/blender/python/bmesh/bmesh_py_types.cc +++ b/source/blender/python/bmesh/bmesh_py_types.cc @@ -31,7 +31,7 @@ #include -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" diff --git a/source/blender/python/bmesh/bmesh_py_types_customdata.cc b/source/blender/python/bmesh/bmesh_py_types_customdata.cc index 11bf99703c2..2fad5170dfa 100644 --- a/source/blender/python/bmesh/bmesh_py_types_customdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_customdata.cc @@ -22,7 +22,7 @@ #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "BKE_customdata.hh" diff --git a/source/blender/python/bmesh/bmesh_py_types_meshdata.cc b/source/blender/python/bmesh/bmesh_py_types_meshdata.cc index 2e16a0eced8..32cbde32021 100644 --- a/source/blender/python/bmesh/bmesh_py_types_meshdata.cc +++ b/source/blender/python/bmesh/bmesh_py_types_meshdata.cc @@ -19,7 +19,7 @@ #include -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "DNA_meshdata_types.h" diff --git a/source/blender/python/bmesh/bmesh_py_utils.cc b/source/blender/python/bmesh/bmesh_py_utils.cc index 5594b0ccd40..695cf9ac435 100644 --- a/source/blender/python/bmesh/bmesh_py_utils.cc +++ b/source/blender/python/bmesh/bmesh_py_utils.cc @@ -16,7 +16,7 @@ #include "MEM_guardedalloc.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "bmesh.hh" #include "bmesh_py_types.h" diff --git a/source/blender/python/gpu/gpu_py_framebuffer.cc b/source/blender/python/gpu/gpu_py_framebuffer.cc index 76a0204e769..a158f940089 100644 --- a/source/blender/python/gpu/gpu_py_framebuffer.cc +++ b/source/blender/python/gpu/gpu_py_framebuffer.cc @@ -22,7 +22,7 @@ #include "../generic/python_compat.h" #include "../generic/python_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "gpu_py.hh" #include "gpu_py_buffer.hh" diff --git a/source/blender/python/gpu/gpu_py_matrix.cc b/source/blender/python/gpu/gpu_py_matrix.cc index 44ec6f26cda..1c3cf046725 100644 --- a/source/blender/python/gpu/gpu_py_matrix.cc +++ b/source/blender/python/gpu/gpu_py_matrix.cc @@ -18,7 +18,7 @@ #include "BLI_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "../generic/py_capi_utils.h" diff --git a/source/blender/python/gpu/gpu_py_offscreen.cc b/source/blender/python/gpu/gpu_py_offscreen.cc index e8782046751..a7214794dd8 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.cc +++ b/source/blender/python/gpu/gpu_py_offscreen.cc @@ -30,7 +30,7 @@ #include "ED_view3d_offscreen.hh" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_compat.h" diff --git a/source/blender/python/gpu/gpu_py_shader.cc b/source/blender/python/gpu/gpu_py_shader.cc index 3335b2f802d..e487d3003ef 100644 --- a/source/blender/python/gpu/gpu_py_shader.cc +++ b/source/blender/python/gpu/gpu_py_shader.cc @@ -21,7 +21,7 @@ #include "../generic/python_compat.h" #include "../generic/python_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "gpu_py.hh" #include "gpu_py_texture.hh" diff --git a/source/blender/python/intern/bpy_interface.cc b/source/blender/python/intern/bpy_interface.cc index d93dd205028..67287afb10e 100644 --- a/source/blender/python/intern/bpy_interface.cc +++ b/source/blender/python/intern/bpy_interface.cc @@ -69,7 +69,7 @@ #include "../generic/idprop_py_api.h" #include "../generic/imbuf_py_api.h" #include "../gpu/gpu_py_api.hh" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" /* Logging types to use anywhere in the Python modules. */ diff --git a/source/blender/python/intern/bpy_msgbus.cc b/source/blender/python/intern/bpy_msgbus.cc index 36726cf1598..c845ec9cd20 100644 --- a/source/blender/python/intern/bpy_msgbus.cc +++ b/source/blender/python/intern/bpy_msgbus.cc @@ -14,7 +14,7 @@ #include "../generic/python_compat.h" #include "../generic/python_utildefines.h" -#include "../mathutils/mathutils.h" +#include "../mathutils/mathutils.hh" #include "BLI_utildefines.h" diff --git a/source/blender/python/intern/bpy_rna.cc b/source/blender/python/intern/bpy_rna.cc index 0a65039879c..efb2f4bbb22 100644 --- a/source/blender/python/intern/bpy_rna.cc +++ b/source/blender/python/intern/bpy_rna.cc @@ -393,7 +393,7 @@ static int pyrna_py_to_prop( static int deferred_register_prop(StructRNA *srna, PyObject *key, PyObject *item); #ifdef USE_MATHUTILS -# include "../mathutils/mathutils.h" /* So we can have mathutils callbacks. */ +# include "../mathutils/mathutils.hh" /* So we can have mathutils callbacks. */ static PyObject *pyrna_prop_array_subscript_slice(BPy_PropertyArrayRNA *self, PointerRNA *ptr, diff --git a/source/blender/python/intern/bpy_rna_array.cc b/source/blender/python/intern/bpy_rna_array.cc index 9d37a8578ce..e08355d2988 100644 --- a/source/blender/python/intern/bpy_rna_array.cc +++ b/source/blender/python/intern/bpy_rna_array.cc @@ -29,7 +29,7 @@ #define USE_MATHUTILS #ifdef USE_MATHUTILS -# include "../mathutils/mathutils.h" /* so we can have mathutils callbacks */ +# include "../mathutils/mathutils.hh" /* so we can have mathutils callbacks */ #endif #define MAX_ARRAY_DIMENSION 10 diff --git a/source/blender/python/mathutils/CMakeLists.txt b/source/blender/python/mathutils/CMakeLists.txt index 45693def4a7..60b03cbdafa 100644 --- a/source/blender/python/mathutils/CMakeLists.txt +++ b/source/blender/python/mathutils/CMakeLists.txt @@ -26,17 +26,17 @@ set(SRC mathutils_kdtree.cc mathutils_noise.cc - mathutils.h - mathutils_Color.h - mathutils_Euler.h - mathutils_Matrix.h - mathutils_Quaternion.h - mathutils_Vector.h - mathutils_bvhtree.h - mathutils_geometry.h - mathutils_interpolate.h - mathutils_kdtree.h - mathutils_noise.h + mathutils.hh + mathutils_Color.hh + mathutils_Euler.hh + mathutils_Matrix.hh + mathutils_Quaternion.hh + mathutils_Vector.hh + mathutils_bvhtree.hh + mathutils_geometry.hh + mathutils_interpolate.hh + mathutils_kdtree.hh + mathutils_noise.hh ) set(LIB diff --git a/source/blender/python/mathutils/mathutils.cc b/source/blender/python/mathutils/mathutils.cc index 7ded91ac641..977da6e85f0 100644 --- a/source/blender/python/mathutils/mathutils.cc +++ b/source/blender/python/mathutils/mathutils.cc @@ -8,7 +8,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" @@ -755,12 +755,12 @@ static PyModuleDef M_Mathutils_module_def = { }; /* submodules only */ -#include "mathutils_geometry.h" -#include "mathutils_interpolate.h" +#include "mathutils_geometry.hh" +#include "mathutils_interpolate.hh" #ifndef MATH_STANDALONE -# include "mathutils_bvhtree.h" -# include "mathutils_kdtree.h" -# include "mathutils_noise.h" +# include "mathutils_bvhtree.hh" +# include "mathutils_kdtree.hh" +# include "mathutils_noise.hh" #endif PyMODINIT_FUNC PyInit_mathutils() diff --git a/source/blender/python/mathutils/mathutils.h b/source/blender/python/mathutils/mathutils.hh similarity index 97% rename from source/blender/python/mathutils/mathutils.h rename to source/blender/python/mathutils/mathutils.hh index 21ac0645145..166c86d8b0e 100644 --- a/source/blender/python/mathutils/mathutils.h +++ b/source/blender/python/mathutils/mathutils.hh @@ -56,16 +56,16 @@ enum { /** Wrapped data type. */ \ unsigned char flag -typedef struct { +struct BaseMathObject { BASE_MATH_MEMBERS(data); -} BaseMathObject; +}; /* types */ -#include "mathutils_Color.h" -#include "mathutils_Euler.h" -#include "mathutils_Matrix.h" -#include "mathutils_Quaternion.h" -#include "mathutils_Vector.h" +#include "mathutils_Color.hh" +#include "mathutils_Euler.hh" +#include "mathutils_Matrix.hh" +#include "mathutils_Quaternion.hh" +#include "mathutils_Vector.hh" /* avoid checking all types */ #define BaseMathObject_CheckExact(v) (Py_TYPE(v)->tp_dealloc == (destructor)BaseMathObject_dealloc) @@ -83,7 +83,7 @@ int BaseMathObject_clear(BaseMathObject *self); void BaseMathObject_dealloc(BaseMathObject *self); int BaseMathObject_is_gc(BaseMathObject *self); -PyMODINIT_FUNC PyInit_mathutils(void); +PyMODINIT_FUNC PyInit_mathutils(); int EXPP_FloatsAreEqual(float af, float bf, int maxDiff); int EXPP_VectorsAreEqual(const float *vecA, const float *vecB, int size, int floatSteps); diff --git a/source/blender/python/mathutils/mathutils_Color.cc b/source/blender/python/mathutils/mathutils_Color.cc index ddc245b2331..ddceb44d2aa 100644 --- a/source/blender/python/mathutils/mathutils_Color.cc +++ b/source/blender/python/mathutils/mathutils_Color.cc @@ -10,7 +10,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "BLI_utildefines.h" diff --git a/source/blender/python/mathutils/mathutils_Color.h b/source/blender/python/mathutils/mathutils_Color.hh similarity index 97% rename from source/blender/python/mathutils/mathutils_Color.h rename to source/blender/python/mathutils/mathutils_Color.hh index 0fd8ea2446b..2575cee7e72 100644 --- a/source/blender/python/mathutils/mathutils_Color.h +++ b/source/blender/python/mathutils/mathutils_Color.hh @@ -12,9 +12,9 @@ extern PyTypeObject color_Type; #define ColorObject_Check(v) PyObject_TypeCheck((v), &color_Type) #define ColorObject_CheckExact(v) (Py_TYPE(v) == &color_Type) -typedef struct { +struct ColorObject { BASE_MATH_MEMBERS(col); -} ColorObject; +}; /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will diff --git a/source/blender/python/mathutils/mathutils_Euler.cc b/source/blender/python/mathutils/mathutils_Euler.cc index 171936a8af8..2f97378188f 100644 --- a/source/blender/python/mathutils/mathutils_Euler.cc +++ b/source/blender/python/mathutils/mathutils_Euler.cc @@ -10,7 +10,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" diff --git a/source/blender/python/mathutils/mathutils_Euler.h b/source/blender/python/mathutils/mathutils_Euler.hh similarity index 97% rename from source/blender/python/mathutils/mathutils_Euler.h rename to source/blender/python/mathutils/mathutils_Euler.hh index d9faf24a2a5..f61839917d6 100644 --- a/source/blender/python/mathutils/mathutils_Euler.h +++ b/source/blender/python/mathutils/mathutils_Euler.hh @@ -12,11 +12,10 @@ extern PyTypeObject euler_Type; #define EulerObject_Check(v) PyObject_TypeCheck((v), &euler_Type) #define EulerObject_CheckExact(v) (Py_TYPE(v) == &euler_Type) -typedef struct { +struct EulerObject { BASE_MATH_MEMBERS(eul); unsigned char order; /* rotation order */ - -} EulerObject; +}; /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will diff --git a/source/blender/python/mathutils/mathutils_Matrix.cc b/source/blender/python/mathutils/mathutils_Matrix.cc index d259acdfad5..711c7ae7d63 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.cc +++ b/source/blender/python/mathutils/mathutils_Matrix.cc @@ -10,7 +10,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "BLI_math_matrix.h" #include "BLI_math_rotation.h" diff --git a/source/blender/python/mathutils/mathutils_Matrix.h b/source/blender/python/mathutils/mathutils_Matrix.hh similarity index 99% rename from source/blender/python/mathutils/mathutils_Matrix.h rename to source/blender/python/mathutils/mathutils_Matrix.hh index a5bcf8c760d..924334d214b 100644 --- a/source/blender/python/mathutils/mathutils_Matrix.h +++ b/source/blender/python/mathutils/mathutils_Matrix.hh @@ -36,11 +36,11 @@ typedef unsigned short ushort; #define MATRIX_COL_INDEX(_mat, _col) (MATRIX_ITEM_INDEX(_mat, 0, _col)) #define MATRIX_COL_PTR(_mat, _col) ((_mat)->matrix + MATRIX_COL_INDEX(_mat, _col)) -typedef struct { +struct MatrixObject { BASE_MATH_MEMBERS(matrix); ushort col_num; ushort row_num; -} MatrixObject; +}; /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will diff --git a/source/blender/python/mathutils/mathutils_Quaternion.cc b/source/blender/python/mathutils/mathutils_Quaternion.cc index 437b4af317c..f50a6af463a 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.cc +++ b/source/blender/python/mathutils/mathutils_Quaternion.cc @@ -10,7 +10,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "BLI_math_base_safe.h" #include "BLI_math_matrix.h" diff --git a/source/blender/python/mathutils/mathutils_Quaternion.h b/source/blender/python/mathutils/mathutils_Quaternion.hh similarity index 96% rename from source/blender/python/mathutils/mathutils_Quaternion.h rename to source/blender/python/mathutils/mathutils_Quaternion.hh index a60267addb2..81b41e7dd84 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.h +++ b/source/blender/python/mathutils/mathutils_Quaternion.hh @@ -13,9 +13,9 @@ extern PyTypeObject quaternion_Type; #define QuaternionObject_Check(v) PyObject_TypeCheck((v), &quaternion_Type) #define QuaternionObject_CheckExact(v) (Py_TYPE(v) == &quaternion_Type) -typedef struct { +struct QuaternionObject { BASE_MATH_MEMBERS(quat); -} QuaternionObject; +}; /* struct data contains a pointer to the actual data that the * object uses. It can use either PyMem allocated data (which will diff --git a/source/blender/python/mathutils/mathutils_Vector.cc b/source/blender/python/mathutils/mathutils_Vector.cc index b026eb7345c..0b006c55282 100644 --- a/source/blender/python/mathutils/mathutils_Vector.cc +++ b/source/blender/python/mathutils/mathutils_Vector.cc @@ -10,7 +10,7 @@ #include -#include "mathutils.h" +#include "mathutils.hh" #include "BLI_math_base_safe.h" #include "BLI_math_matrix.h" diff --git a/source/blender/python/mathutils/mathutils_Vector.h b/source/blender/python/mathutils/mathutils_Vector.hh similarity index 93% rename from source/blender/python/mathutils/mathutils_Vector.h rename to source/blender/python/mathutils/mathutils_Vector.hh index 3575197606a..03091055c43 100644 --- a/source/blender/python/mathutils/mathutils_Vector.h +++ b/source/blender/python/mathutils/mathutils_Vector.hh @@ -8,21 +8,17 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - extern PyTypeObject vector_Type; #define VectorObject_Check(v) PyObject_TypeCheck((v), &vector_Type) #define VectorObject_CheckExact(v) (Py_TYPE(v) == &vector_Type) -typedef struct { +struct VectorObject { BASE_MATH_MEMBERS(vec); /** Number of items in this vector (2 or more). */ int vec_num; -} VectorObject; +}; /* Prototypes. */ @@ -53,7 +49,3 @@ PyObject *Vector_CreatePyObject_alloc(float *vec, int vec_num, PyTypeObject *base_type) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1); - -#ifdef __cplusplus -} -#endif diff --git a/source/blender/python/mathutils/mathutils_bvhtree.cc b/source/blender/python/mathutils/mathutils_bvhtree.cc index c7a6f73979a..d8727a49fd3 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.cc +++ b/source/blender/python/mathutils/mathutils_bvhtree.cc @@ -27,8 +27,8 @@ #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" -#include "mathutils.h" -#include "mathutils_bvhtree.h" /* own include */ +#include "mathutils.hh" +#include "mathutils_bvhtree.hh" /* own include */ #ifndef MATH_STANDALONE # include "DNA_mesh_types.h" diff --git a/source/blender/python/mathutils/mathutils_bvhtree.h b/source/blender/python/mathutils/mathutils_bvhtree.hh similarity index 87% rename from source/blender/python/mathutils/mathutils_bvhtree.h rename to source/blender/python/mathutils/mathutils_bvhtree.hh index f7c954dd416..52fa7d5e833 100644 --- a/source/blender/python/mathutils/mathutils_bvhtree.h +++ b/source/blender/python/mathutils/mathutils_bvhtree.hh @@ -8,7 +8,7 @@ #pragma once -PyMODINIT_FUNC PyInit_mathutils_bvhtree(void); +PyMODINIT_FUNC PyInit_mathutils_bvhtree(); extern PyTypeObject PyBVHTree_Type; diff --git a/source/blender/python/mathutils/mathutils_geometry.cc b/source/blender/python/mathutils/mathutils_geometry.cc index 10a78570fb7..5e18ff0eed5 100644 --- a/source/blender/python/mathutils/mathutils_geometry.cc +++ b/source/blender/python/mathutils/mathutils_geometry.cc @@ -8,8 +8,8 @@ #include -#include "mathutils.h" -#include "mathutils_geometry.h" +#include "mathutils.hh" +#include "mathutils_geometry.hh" /* Used for PolyFill */ #ifndef MATH_STANDALONE /* define when building outside blender */ diff --git a/source/blender/python/mathutils/mathutils_geometry.h b/source/blender/python/mathutils/mathutils_geometry.hh similarity index 76% rename from source/blender/python/mathutils/mathutils_geometry.h rename to source/blender/python/mathutils/mathutils_geometry.hh index 6d8f41c0167..760cd2a11fa 100644 --- a/source/blender/python/mathutils/mathutils_geometry.h +++ b/source/blender/python/mathutils/mathutils_geometry.hh @@ -8,4 +8,4 @@ * \ingroup pymathutils */ -PyMODINIT_FUNC PyInit_mathutils_geometry(void); +PyMODINIT_FUNC PyInit_mathutils_geometry(); diff --git a/source/blender/python/mathutils/mathutils_interpolate.cc b/source/blender/python/mathutils/mathutils_interpolate.cc index 46cca769226..bc019c77e5b 100644 --- a/source/blender/python/mathutils/mathutils_interpolate.cc +++ b/source/blender/python/mathutils/mathutils_interpolate.cc @@ -8,8 +8,8 @@ #include -#include "mathutils.h" -#include "mathutils_interpolate.h" +#include "mathutils.hh" +#include "mathutils_interpolate.hh" #include "BLI_math_geom.h" #include "BLI_utildefines.h" diff --git a/source/blender/python/mathutils/mathutils_interpolate.h b/source/blender/python/mathutils/mathutils_interpolate.hh similarity index 75% rename from source/blender/python/mathutils/mathutils_interpolate.h rename to source/blender/python/mathutils/mathutils_interpolate.hh index 63212cac21a..8c993b6a623 100644 --- a/source/blender/python/mathutils/mathutils_interpolate.h +++ b/source/blender/python/mathutils/mathutils_interpolate.hh @@ -8,4 +8,4 @@ * \ingroup pymathutils */ -PyMODINIT_FUNC PyInit_mathutils_interpolate(void); +PyMODINIT_FUNC PyInit_mathutils_interpolate(); diff --git a/source/blender/python/mathutils/mathutils_kdtree.cc b/source/blender/python/mathutils/mathutils_kdtree.cc index 580035341cd..4231cbee402 100644 --- a/source/blender/python/mathutils/mathutils_kdtree.cc +++ b/source/blender/python/mathutils/mathutils_kdtree.cc @@ -19,8 +19,8 @@ #include "../generic/py_capi_utils.h" #include "../generic/python_utildefines.h" -#include "mathutils.h" -#include "mathutils_kdtree.h" /* own include */ +#include "mathutils.hh" +#include "mathutils_kdtree.hh" /* own include */ #include "BLI_strict_flags.h" /* Keep last. */ diff --git a/source/blender/python/mathutils/mathutils_kdtree.h b/source/blender/python/mathutils/mathutils_kdtree.hh similarity index 80% rename from source/blender/python/mathutils/mathutils_kdtree.h rename to source/blender/python/mathutils/mathutils_kdtree.hh index a83dcf971dd..fffe8e7ccf6 100644 --- a/source/blender/python/mathutils/mathutils_kdtree.h +++ b/source/blender/python/mathutils/mathutils_kdtree.hh @@ -8,6 +8,6 @@ #pragma once -PyMODINIT_FUNC PyInit_mathutils_kdtree(void); +PyMODINIT_FUNC PyInit_mathutils_kdtree(); extern PyTypeObject PyKDTree_Type; diff --git a/source/blender/python/mathutils/mathutils_noise.cc b/source/blender/python/mathutils/mathutils_noise.cc index 2e0c1655dfc..b3ddde5b38e 100644 --- a/source/blender/python/mathutils/mathutils_noise.cc +++ b/source/blender/python/mathutils/mathutils_noise.cc @@ -23,8 +23,8 @@ #include "../generic/py_capi_utils.h" -#include "mathutils.h" -#include "mathutils_noise.h" +#include "mathutils.hh" +#include "mathutils_noise.hh" /*-----------------------------------------*/ /* 'mersenne twister' random number generator */ diff --git a/source/blender/python/mathutils/mathutils_noise.h b/source/blender/python/mathutils/mathutils_noise.hh similarity index 77% rename from source/blender/python/mathutils/mathutils_noise.h rename to source/blender/python/mathutils/mathutils_noise.hh index 8c12ad2ee1f..674ba4c8c76 100644 --- a/source/blender/python/mathutils/mathutils_noise.h +++ b/source/blender/python/mathutils/mathutils_noise.hh @@ -8,4 +8,4 @@ #pragma once -PyMODINIT_FUNC PyInit_mathutils_noise(void); +PyMODINIT_FUNC PyInit_mathutils_noise();