diff options
Diffstat (limited to 'source/blender/python/gpu/gpu_py_types.c')
-rw-r--r-- | source/blender/python/gpu/gpu_py_types.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/source/blender/python/gpu/gpu_py_types.c b/source/blender/python/gpu/gpu_py_types.c index d70c5ba4966..f0208d3993e 100644 --- a/source/blender/python/gpu/gpu_py_types.c +++ b/source/blender/python/gpu/gpu_py_types.c @@ -62,18 +62,12 @@ PyObject *bpygpu_types_init(void) return NULL; } -#define MODULE_TYPE_ADD(s, t) \ - PyModule_AddObject(s, t.tp_name, (PyObject *)&t); \ - Py_INCREF((PyObject *)&t) - - MODULE_TYPE_ADD(submodule, BPyGPUVertFormat_Type); - MODULE_TYPE_ADD(submodule, BPyGPUVertBuf_Type); - MODULE_TYPE_ADD(submodule, BPyGPUIndexBuf_Type); - MODULE_TYPE_ADD(submodule, BPyGPUBatch_Type); - MODULE_TYPE_ADD(submodule, BPyGPUOffScreen_Type); - MODULE_TYPE_ADD(submodule, BPyGPUShader_Type); - -#undef MODULE_TYPE_ADD + PyModule_AddType(submodule, &BPyGPUVertFormat_Type); + PyModule_AddType(submodule, &BPyGPUVertBuf_Type); + PyModule_AddType(submodule, &BPyGPUIndexBuf_Type); + PyModule_AddType(submodule, &BPyGPUBatch_Type); + PyModule_AddType(submodule, &BPyGPUOffScreen_Type); + PyModule_AddType(submodule, &BPyGPUShader_Type); return submodule; } |