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:
Campbell Barton 2022-11-08 11:13:58 +11:00
parent 3e71220efc
commit 4eb9322eda
38 changed files with 326 additions and 256 deletions

View File

@ -280,10 +280,14 @@ static PyMethodDef module_functions[] = {
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
"Freestyle.ContextFunctions",
module_docstring,
-1,
module_functions,
/*m_name*/ "Freestyle.ContextFunctions",
/*m_doc*/ module_docstring,
/*m_size*/ -1,
/*m_methods*/ module_functions,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
//------------------- MODULE INITIALIZATION --------------------------------

View File

@ -509,10 +509,14 @@ static PyMethodDef module_functions[] = {
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
"_freestyle",
module_docstring,
-1,
module_functions,
/*m_name*/ "_freestyle",
/*m_doc*/ module_docstring,
/*m_size*/ -1,
/*m_methods*/ module_functions,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
//-------------------MODULE INITIALIZATION--------------------------------

View File

@ -112,10 +112,14 @@ static PyMethodDef module_functions[] = {
static PyModuleDef module_definition = {
PyModuleDef_HEAD_INIT,
"Freestyle.Integrator",
module_docstring,
-1,
module_functions,
/*m_name*/ "Freestyle.Integrator",
/*m_doc*/ module_docstring,
/*m_size*/ -1,
/*m_methods*/ module_functions,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/*-----------------------BPy_IntegrationType type definition ------------------------------*/

View File

@ -156,14 +156,14 @@ PyDoc_STRVAR(BPy_BM_doc,
".. include:: include__bmesh.rst\n");
static struct PyModuleDef BPy_BM_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh", /* m_name */
BPy_BM_doc, /* m_doc */
0, /* m_size */
BPy_BM_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bmesh",
/*m_doc*/ BPy_BM_doc,
/*m_size*/ 0,
/*m_methods*/ BPy_BM_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_bmesh(void)

View File

@ -62,14 +62,14 @@ PyDoc_STRVAR(BPy_BM_utils_doc,
"This module provides access to bmesh geometry evaluation functions.");
static struct PyModuleDef BPy_BM_geometry_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh.geometry", /* m_name */
BPy_BM_utils_doc, /* m_doc */
0, /* m_size */
BPy_BM_geometry_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bmesh.geometry",
/*m_doc*/ BPy_BM_utils_doc,
/*m_size*/ 0,
/*m_methods*/ BPy_BM_geometry_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_bmesh_geometry(void)

View File

@ -235,14 +235,14 @@ static struct PyMethodDef BPy_BM_ops_methods[] = {
PyDoc_STRVAR(BPy_BM_ops_doc, "Access to BMesh operators");
static struct PyModuleDef BPy_BM_ops_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh.ops", /* m_name */
BPy_BM_ops_doc, /* m_doc */
0, /* m_size */
BPy_BM_ops_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bmesh.ops",
/*m_doc*/ BPy_BM_ops_doc,
/*m_size*/ 0,
/*m_methods*/ BPy_BM_ops_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_bmesh_ops(void)

View File

@ -3735,14 +3735,14 @@ void BPy_BM_init_types(void)
static struct PyModuleDef BPy_BM_types_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh.types", /* m_name */
NULL, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bmesh.types",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_bmesh_types(void)

View File

@ -818,14 +818,14 @@ static struct PyMethodDef BPy_BM_utils_methods[] = {
PyDoc_STRVAR(BPy_BM_utils_doc, "This module provides access to blenders bmesh data structures.");
static struct PyModuleDef BPy_BM_utils_module_def = {
PyModuleDef_HEAD_INIT,
"bmesh.utils", /* m_name */
BPy_BM_utils_doc, /* m_doc */
0, /* m_size */
BPy_BM_utils_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bmesh.utils",
/*m_doc*/ BPy_BM_utils_doc,
/*m_size*/ 0,
/*m_methods*/ BPy_BM_utils_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_bmesh_utils(void)

View File

@ -1376,14 +1376,14 @@ BGL_Wrap(TexImage3DMultisample,
static struct PyModuleDef BGL_module_def = {
PyModuleDef_HEAD_INIT,
"bgl", /* m_name */
NULL, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bgl",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
static void py_module_dict_add_int(PyObject *dict, const char *name, int value)

View File

@ -129,14 +129,14 @@ static PyMethodDef M_bl_math_methods[] = {
static struct PyModuleDef M_bl_math_module_def = {
PyModuleDef_HEAD_INIT,
"bl_math", /* m_name */
M_bl_math_doc, /* m_doc */
0, /* m_size */
M_bl_math_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bl_math",
/*m_doc*/ M_bl_math_doc,
/*m_size*/ 0,
/*m_methods*/ M_bl_math_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyMODINIT_FUNC BPyInit_bl_math(void)

View File

@ -466,14 +466,14 @@ static PyMethodDef BLF_methods[] = {
PyDoc_STRVAR(BLF_doc, "This module provides access to Blender's text drawing functions.");
static struct PyModuleDef BLF_module_def = {
PyModuleDef_HEAD_INIT,
"blf", /* m_name */
BLF_doc, /* m_doc */
0, /* m_size */
BLF_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "blf",
/*m_doc*/ BLF_doc,
/*m_size*/ 0,
/*m_methods*/ BLF_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_blf(void)

View File

@ -2092,14 +2092,14 @@ static PyObject *BPy_IDGroup_ViewItems_CreatePyObject(BPy_IDProperty *group)
static struct PyModuleDef IDProp_types_module_def = {
PyModuleDef_HEAD_INIT,
"idprop.types", /* m_name */
NULL, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "idprop.types",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
static PyObject *BPyInit_idprop_types(void)
@ -2141,14 +2141,14 @@ PyDoc_STRVAR(IDProp_module_doc,
"This module provides access id property types (currently mainly for docs).");
static struct PyModuleDef IDProp_module_def = {
PyModuleDef_HEAD_INIT,
"idprop", /* m_name */
IDProp_module_doc, /* m_doc */
0, /* m_size */
IDProp_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "idprop",
/*m_doc*/ IDProp_module_doc,
/*m_size*/ 0,
/*m_methods*/ IDProp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_idprop(void)

View File

@ -557,14 +557,14 @@ PyDoc_STRVAR(IMB_doc,
":class:`bpy.types.Image` data-block context.\n");
static struct PyModuleDef IMB_module_def = {
PyModuleDef_HEAD_INIT,
"imbuf", /* m_name */
IMB_doc, /* m_doc */
0, /* m_size */
IMB_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "imbuf",
/*m_doc*/ IMB_doc,
/*m_size*/ 0,
/*m_methods*/ IMB_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_imbuf(void)
@ -601,14 +601,14 @@ PyDoc_STRVAR(IMB_types_doc,
static struct PyModuleDef IMB_types_module_def = {
PyModuleDef_HEAD_INIT,
"imbuf.types", /* m_name */
IMB_types_doc, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "imbuf.types",
/*m_doc*/ IMB_types_doc,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_imbuf_types(void)

View File

@ -32,8 +32,14 @@ PyDoc_STRVAR(pygpu_doc,
"Some higher level functions can be found in the `gpu_extras` module.");
static struct PyModuleDef pygpu_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu",
.m_doc = pygpu_doc,
/*m_name*/ "gpu",
/*m_doc*/ pygpu_doc,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit_gpu(void)

View File

@ -301,9 +301,14 @@ static struct PyMethodDef pygpu_capabilities__tp_methods[] = {
PyDoc_STRVAR(pygpu_capabilities__tp_doc, "This module provides access to the GPU capabilities.");
static PyModuleDef pygpu_capabilities_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.capabilities",
.m_doc = pygpu_capabilities__tp_doc,
.m_methods = pygpu_capabilities__tp_methods,
/*m_name*/ "gpu.capabilities",
/*m_doc*/ pygpu_capabilities__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_capabilities__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_capabilities_init(void)

View File

@ -528,9 +528,14 @@ static struct PyMethodDef pygpu_matrix__tp_methods[] = {
PyDoc_STRVAR(pygpu_matrix__tp_doc, "This module provides access to the matrix stack.");
static PyModuleDef pygpu_matrix_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.matrix",
.m_doc = pygpu_matrix__tp_doc,
.m_methods = pygpu_matrix__tp_methods,
/*m_name*/ "gpu.matrix",
/*m_doc*/ pygpu_matrix__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_matrix__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_matrix_init(void)

View File

@ -141,9 +141,14 @@ static struct PyMethodDef pygpu_platform__tp_methods[] = {
PyDoc_STRVAR(pygpu_platform__tp_doc, "This module provides access to GPU Platform definitions.");
static PyModuleDef pygpu_platform_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.platform",
.m_doc = pygpu_platform__tp_doc,
.m_methods = pygpu_platform__tp_methods,
/*m_name*/ "gpu.platform",
/*m_doc*/ pygpu_platform__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_platform__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_platform_init(void)

View File

@ -58,9 +58,14 @@ static struct PyMethodDef pygpu_select__tp_methods[] = {
PyDoc_STRVAR(pygpu_select__tp_doc, "This module provides access to selection.");
static PyModuleDef pygpu_select_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.select",
.m_doc = pygpu_select__tp_doc,
.m_methods = pygpu_select__tp_methods,
/*m_name*/ "gpu.select",
/*m_doc*/ pygpu_select__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_select__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_select_init(void)

View File

@ -923,9 +923,14 @@ PyDoc_STRVAR(pygpu_shader_module__tp_doc,
"\n" PYDOC_BUILTIN_SHADER_DESCRIPTION);
static PyModuleDef pygpu_shader_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.shader",
.m_doc = pygpu_shader_module__tp_doc,
.m_methods = pygpu_shader_module__tp_methods,
/*m_name*/ "gpu.shader",
/*m_doc*/ pygpu_shader_module__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_shader_module__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/** \} */

View File

@ -431,9 +431,14 @@ static struct PyMethodDef pygpu_state__tp_methods[] = {
PyDoc_STRVAR(pygpu_state__tp_doc, "This module provides access to the gpu state.");
static PyModuleDef pygpu_state_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.state",
.m_doc = pygpu_state__tp_doc,
.m_methods = pygpu_state__tp_methods,
/*m_name*/ "gpu.state",
/*m_doc*/ pygpu_state__tp_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_state__tp_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_state_init(void)

View File

@ -565,9 +565,14 @@ static struct PyMethodDef pygpu_texture__m_methods[] = {
PyDoc_STRVAR(pygpu_texture__m_doc, "This module provides utils for textures.");
static PyModuleDef pygpu_texture_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.texture",
.m_doc = pygpu_texture__m_doc,
.m_methods = pygpu_texture__m_methods,
/*m_name*/ "gpu.texture",
/*m_doc*/ pygpu_texture__m_doc,
/*m_size*/ 0,
/*m_methods*/ pygpu_texture__m_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
/** \} */

View File

@ -19,7 +19,14 @@
static struct PyModuleDef pygpu_types_module_def = {
PyModuleDef_HEAD_INIT,
.m_name = "gpu.types",
/*m_name*/ "gpu.types",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *bpygpu_types_init(void)

View File

@ -162,14 +162,14 @@ static struct PyMethodDef M_AppIcons_methods[] = {
static struct PyModuleDef M_AppIcons_module_def = {
PyModuleDef_HEAD_INIT,
"bpy.app.icons", /* m_name */
NULL, /* m_doc */
0, /* m_size */
M_AppIcons_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bpy.app.icons",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ M_AppIcons_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_app_icons_module(void)

View File

@ -164,14 +164,14 @@ static struct PyMethodDef M_AppTimers_methods[] = {
static struct PyModuleDef M_AppTimers_module_def = {
PyModuleDef_HEAD_INIT,
"bpy.app.timers", /* m_name */
NULL, /* m_doc */
0, /* m_size */
M_AppTimers_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bpy.app.timers",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ M_AppTimers_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_app_timers_module(void)

View File

@ -768,14 +768,14 @@ extern void main_python_exit(void);
static struct PyModuleDef bpy_proxy_def = {
PyModuleDef_HEAD_INIT,
"bpy", /* m_name */
NULL, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
bpy_module_free, /* m_free */
/*m_name*/ "bpy",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ bpy_module_free,
};
typedef struct {

View File

@ -393,8 +393,14 @@ static struct PyMethodDef BPy_msgbus_methods[] = {
static struct PyModuleDef _bpy_msgbus_def = {
PyModuleDef_HEAD_INIT,
.m_name = "msgbus",
.m_methods = BPy_msgbus_methods,
/*m_name*/ "msgbus",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ BPy_msgbus_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_msgbus_module(void)

View File

@ -493,14 +493,14 @@ static struct PyMethodDef bpy_ops_methods[] = {
static struct PyModuleDef bpy_ops_module = {
PyModuleDef_HEAD_INIT,
"_bpy.ops",
NULL,
-1, /* multiple "initialization" just copies the module dict. */
bpy_ops_methods,
NULL,
NULL,
NULL,
NULL,
/*m_name*/ "_bpy.ops",
/*m_doc*/ NULL,
/*m_size*/ -1, /* multiple "initialization" just copies the module dict. */
/*m_methods*/ bpy_ops_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_operator_module(void)

View File

@ -22,14 +22,14 @@ extern const char *imb_ext_audio[];
/*----------------------------MODULE INIT-------------------------*/
static struct PyModuleDef _bpy_path_module_def = {
PyModuleDef_HEAD_INIT,
"_bpy_path", /* m_name */
NULL, /* m_doc */
0, /* m_size */
NULL, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "_bpy_path",
/*m_doc*/ NULL,
/*m_size*/ 0,
/*m_methods*/ NULL,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPyInit__bpy_path(void)

View File

@ -4621,21 +4621,25 @@ static int props_clear(PyObject *UNUSED(self))
return 0;
}
static struct PyModuleDef props_module = {
PyModuleDef_HEAD_INIT,
"bpy.props",
PyDoc_STRVAR(
props_module_doc,
"This module defines properties to extend Blender's internal data. The result of these "
"functions"
" is used to assign properties to classes registered with Blender and can't be used "
"directly.\n"
"\n"
".. note:: All parameters to these functions must be passed as keywords.\n",
-1, /* multiple "initialization" just copies the module dict. */
props_methods,
NULL,
props_visit,
props_clear,
NULL,
".. note:: All parameters to these functions must be passed as keywords.\n");
static struct PyModuleDef props_module = {
PyModuleDef_HEAD_INIT,
/*m_name*/ "bpy.props",
/*m_doc*/ props_module_doc,
/*m_size*/ -1, /* multiple "initialization" just copies the module dict. */
/*m_methods*/ props_methods,
/*m_slots*/ NULL,
/*m_traverse*/ props_visit,
/*m_clear*/ props_clear,
/*m_free*/ NULL,
};
PyObject *BPY_rna_props(void)

View File

@ -7672,14 +7672,14 @@ static struct PyMethodDef bpy_types_module_methods[] = {
PyDoc_STRVAR(bpy_types_module_doc, "Access to internal Blender types");
static struct PyModuleDef bpy_types_module_def = {
PyModuleDef_HEAD_INIT,
"bpy.types", /* m_name */
bpy_types_module_doc, /* m_doc */
sizeof(struct BPy_TypesModule_State), /* m_size */
bpy_types_module_methods, /* m_methods */
NULL, /* m_slots */
NULL, /* m_traverse */
NULL, /* m_clear */
NULL, /* m_free */
/*m_name*/ "bpy.types",
/*m_doc*/ bpy_types_module_doc,
/*m_size*/ sizeof(struct BPy_TypesModule_State),
/*m_methods*/ bpy_types_module_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_rna_types(void)

View File

@ -163,14 +163,14 @@ PyDoc_STRVAR(
"(low-level API, not exposed to final users).");
static struct PyModuleDef bpy_utils_previews_module = {
PyModuleDef_HEAD_INIT,
"bpy._utils_previews",
bpy_utils_previews_doc,
0,
bpy_utils_previews_methods,
NULL,
NULL,
NULL,
NULL,
/*m_name*/ "bpy._utils_previews",
/*m_doc*/ bpy_utils_previews_doc,
/*m_size*/ 0,
/*m_methods*/ bpy_utils_previews_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_utils_previews_module(void)

View File

@ -336,14 +336,14 @@ PyDoc_STRVAR(bpyunits_doc, "This module contains some data/methods regarding uni
static struct PyModuleDef bpyunits_module = {
PyModuleDef_HEAD_INIT,
"bpy.utils.units",
bpyunits_doc,
-1, /* multiple "initialization" just copies the module dict. */
bpyunits_methods,
NULL,
NULL,
NULL,
NULL,
/*m_name*/ "bpy.utils.units",
/*m_doc*/ bpyunits_doc,
/*m_size*/ -1, /* multiple "initialization" just copies the module dict. */
/*m_methods*/ bpyunits_methods,
/*m_slots*/ NULL,
/*m_traverse*/ NULL,
/*m_clear*/ NULL,
/*m_free*/ NULL,
};
PyObject *BPY_utils_units(void)

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-------------------------*/