diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-29 22:12:48 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-29 23:14:28 +0300 |
commit | 25ec4b437fe927205a810470cdc23efd7282c85b (patch) | |
tree | 6d7ba2fe73703915b4b94d3f2dab03fb731e9544 /source/blender/python/gpu | |
parent | 18d06e8d21ed8c9a19df4205abcd7ed17eb9af00 (diff) |
Cleanup: style, use braces for the Python API
Diffstat (limited to 'source/blender/python/gpu')
-rw-r--r-- | source/blender/python/gpu/gpu_py_offscreen.c | 3 | ||||
-rw-r--r-- | source/blender/python/gpu/gpu_py_types.c | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/source/blender/python/gpu/gpu_py_offscreen.c b/source/blender/python/gpu/gpu_py_offscreen.c index 5482677defc..cd9e162b1aa 100644 --- a/source/blender/python/gpu/gpu_py_offscreen.c +++ b/source/blender/python/gpu/gpu_py_offscreen.c @@ -299,8 +299,9 @@ static PyObject *bpygpu_offscreen_bind_context_exit(BPyGPUOffScreen *self, PyObj static void BPyGPUOffScreen__tp_dealloc(BPyGPUOffScreen *self) { - if (self->ofs) + if (self->ofs) { GPU_offscreen_free(self->ofs); + } Py_TYPE(self)->tp_free((PyObject *)self); } diff --git a/source/blender/python/gpu/gpu_py_types.c b/source/blender/python/gpu/gpu_py_types.c index 7ed1832eb57..67bdc070168 100644 --- a/source/blender/python/gpu/gpu_py_types.c +++ b/source/blender/python/gpu/gpu_py_types.c @@ -45,18 +45,24 @@ PyObject *BPyInit_gpu_types(void) submodule = PyModule_Create(&BPyGPU_types_module_def); - if (PyType_Ready(&BPyGPUVertFormat_Type) < 0) + if (PyType_Ready(&BPyGPUVertFormat_Type) < 0) { return NULL; - if (PyType_Ready(&BPyGPUVertBuf_Type) < 0) + } + if (PyType_Ready(&BPyGPUVertBuf_Type) < 0) { return NULL; - if (PyType_Ready(&BPyGPUIndexBuf_Type) < 0) + } + if (PyType_Ready(&BPyGPUIndexBuf_Type) < 0) { return NULL; - if (PyType_Ready(&BPyGPUBatch_Type) < 0) + } + if (PyType_Ready(&BPyGPUBatch_Type) < 0) { return NULL; - if (PyType_Ready(&BPyGPUOffScreen_Type) < 0) + } + if (PyType_Ready(&BPyGPUOffScreen_Type) < 0) { return NULL; - if (PyType_Ready(&BPyGPUShader_Type) < 0) + } + if (PyType_Ready(&BPyGPUShader_Type) < 0) { return NULL; + } #define MODULE_TYPE_ADD(s, t) \ PyModule_AddObject(s, t.tp_name, (PyObject *)&t); Py_INCREF((PyObject *)&t) |