From 276e5f709518e0a64c7bf520062de9ed9337572f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Oct 2011 01:29:08 +0000 Subject: formatting edits & remove debug print. --- source/blender/python/intern/bpy_app_handlers.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/python/intern/bpy_app_handlers.c') diff --git a/source/blender/python/intern/bpy_app_handlers.c b/source/blender/python/intern/bpy_app_handlers.c index cd3d78410f2..1a50ae79dc7 100644 --- a/source/blender/python/intern/bpy_app_handlers.c +++ b/source/blender/python/intern/bpy_app_handlers.c @@ -77,13 +77,13 @@ static PyObject *make_app_cb_info(void) return NULL; } - for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) { - if(app_cb_info_fields[pos].name == NULL) { + for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) { + if (app_cb_info_fields[pos].name == NULL) { Py_FatalError("invalid callback slots 1"); } PyStructSequence_SET_ITEM(app_cb_info, pos, (py_cb_array[pos]= PyList_New(0))); } - if(app_cb_info_fields[pos].name != NULL) { + if (app_cb_info_fields[pos].name != NULL) { Py_FatalError("invalid callback slots 2"); } @@ -103,12 +103,12 @@ PyObject *BPY_app_handlers_struct(void) BlenderAppCbType.tp_new= NULL; /* assign the C callbacks */ - if(ret) { + if (ret) { static bCallbackFuncStore funcstore_array[BLI_CB_EVT_TOT]= {{NULL}}; bCallbackFuncStore *funcstore; int pos= 0; - for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) { + for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) { funcstore= &funcstore_array[pos]; funcstore->func= bpy_app_generic_callback; funcstore->alloc= 0; @@ -124,7 +124,7 @@ void BPY_app_handlers_reset(void) { int pos= 0; - for(pos= 0; pos < BLI_CB_EVT_TOT; pos++) { + for (pos= 0; pos < BLI_CB_EVT_TOT; pos++) { PyList_SetSlice(py_cb_array[pos], 0, PY_SSIZE_T_MAX, NULL); } } @@ -134,7 +134,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar { PyObject *cb_list= py_cb_array[GET_INT_FROM_POINTER(arg)]; Py_ssize_t cb_list_len; - if((cb_list_len= PyList_GET_SIZE(cb_list)) > 0) { + if ((cb_list_len= PyList_GET_SIZE(cb_list)) > 0) { PyGILState_STATE gilstate= PyGILState_Ensure(); PyObject* args= PyTuple_New(1); // save python creating each call @@ -143,7 +143,7 @@ void bpy_app_generic_callback(struct Main *UNUSED(main), struct ID *id, void *ar Py_ssize_t pos; /* setup arguments */ - if(id) { + if (id) { PointerRNA id_ptr; RNA_id_pointer_create(id, &id_ptr); PyTuple_SET_ITEM(args, 0, pyrna_struct_CreatePyObject(&id_ptr)); -- cgit v1.2.3