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>2021-02-12 00:08:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2021-02-12 00:08:16 +0300
commitaa43e2ec29a9f73918b12001c6e4f4b4c63fd9c9 (patch)
tree17cb05debbb5fd7e38e65898a083382eb79e1f82 /source/blender/python/generic/idprop_py_api.c
parentd21f44546951a29cea5524fcd2147e08de996c7d (diff)
PyAPI: use PyModule_AddType utility function
Diffstat (limited to 'source/blender/python/generic/idprop_py_api.c')
-rw-r--r--source/blender/python/generic/idprop_py_api.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index daa604a3fbf..6be7348a2f8 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -1799,16 +1799,10 @@ static PyObject *BPyInit_idprop_types(void)
IDProp_Init_Types();
-#define MODULE_TYPE_ADD(s, t) \
- PyModule_AddObject(s, t.tp_name, (PyObject *)&t); \
- Py_INCREF((PyObject *)&t)
-
/* bmesh_py_types.c */
- MODULE_TYPE_ADD(submodule, BPy_IDGroup_Type);
- MODULE_TYPE_ADD(submodule, BPy_IDGroup_Iter_Type);
- MODULE_TYPE_ADD(submodule, BPy_IDArray_Type);
-
-#undef MODULE_TYPE_ADD
+ PyModule_AddType(submodule, &BPy_IDGroup_Type);
+ PyModule_AddType(submodule, &BPy_IDGroup_Iter_Type);
+ PyModule_AddType(submodule, &BPy_IDArray_Type);
return submodule;
}