Cleanup: PyMethodDef formatting

Missed these changes in [0].

Also replace designated initializers in some C code, as it's not used
often and would need to be removed when converting to C++.

[0] e555ede626
This commit is contained in:
2022-11-08 11:13:58 +11:00
parent 3e71220efc
commit 4eb9322eda
38 changed files with 326 additions and 256 deletions

View File

@@ -766,14 +766,14 @@ static struct PyMethodDef M_Mathutils_methods[] = {
static struct PyModuleDef M_Mathutils_module_def = {
PyModuleDef_HEAD_INIT,
"mathutils", /* m_name */
M_Mathutils_doc, /* m_doc */
0, /* m_size */
M_Mathutils_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils",
/*m_doc*/ M_Mathutils_doc,
/*m_size*/ 0,
/*m_methods*/ M_Mathutils_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/* submodules only */

View File

@@ -1293,14 +1293,14 @@ PyDoc_STRVAR(py_bvhtree_doc,
"BVH tree structures for proximity searches and ray casts on geometry.");
static struct PyModuleDef bvhtree_moduledef = {
PyModuleDef_HEAD_INIT,
"mathutils.bvhtree", /* m_name */
py_bvhtree_doc, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils.bvhtree",
/*m_doc*/ py_bvhtree_doc,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyMODINIT_FUNC PyInit_mathutils_bvhtree(void)

View File

@@ -1793,14 +1793,14 @@ static PyMethodDef M_Geometry_methods[] = {
static struct PyModuleDef M_Geometry_module_def = {
PyModuleDef_HEAD_INIT,
"mathutils.geometry", /* m_name */
M_Geometry_doc, /* m_doc */
0, /* m_size */
M_Geometry_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils.geometry",
/*m_doc*/ M_Geometry_doc,
/*m_size*/ 0,
/*m_methods*/ M_Geometry_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/*----------------------------MODULE INIT-------------------------*/

View File

@@ -89,14 +89,14 @@ static PyMethodDef M_Interpolate_methods[] = {
static struct PyModuleDef M_Interpolate_module_def = {
PyModuleDef_HEAD_INIT,
"mathutils.interpolate", /* m_name */
M_Interpolate_doc, /* m_doc */
0, /* m_size */
M_Interpolate_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils.interpolate",
/*m_doc*/ M_Interpolate_doc,
/*m_size*/ 0,
/*m_methods*/ M_Interpolate_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/*----------------------------MODULE INIT-------------------------*/

View File

@@ -428,14 +428,14 @@ PyTypeObject PyKDTree_Type = {
PyDoc_STRVAR(py_kdtree_doc, "Generic 3-dimensional kd-tree to perform spatial searches.");
static struct PyModuleDef kdtree_moduledef = {
PyModuleDef_HEAD_INIT,
"mathutils.kdtree", /* m_name */
py_kdtree_doc, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils.kdtree",
/*m_doc*/ py_kdtree_doc,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyMODINIT_FUNC PyInit_mathutils_kdtree(void)

View File

@@ -1085,14 +1085,14 @@ static PyMethodDef M_Noise_methods[] = {
static struct PyModuleDef M_Noise_module_def = {
PyModuleDef_HEAD_INIT,
"mathutils.noise", /* m_name */
M_Noise_doc, /* m_doc */
0, /* m_size */
M_Noise_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "mathutils.noise",
/*m_doc*/ M_Noise_doc,
/*m_size*/ 0,
/*m_methods*/ M_Noise_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/*----------------------------MODULE INIT-------------------------*/