From 25ec4b437fe927205a810470cdc23efd7282c85b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 30 Mar 2019 06:12:48 +1100 Subject: Cleanup: style, use braces for the Python API --- source/blender/python/gpu/gpu_py_offscreen.c | 3 ++- source/blender/python/gpu/gpu_py_types.c | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 7 deletions(-) (limited to 'source/blender/python/gpu') 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) -- cgit v1.2.3