code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars.
This commit is contained in:
@@ -122,7 +122,7 @@ static void bpy_pydriver_update_dict(const float evaltime)
|
||||
void BPY_driver_reset(void)
|
||||
{
|
||||
PyGILState_STATE gilstate;
|
||||
int use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
int use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
|
||||
if (use_gil)
|
||||
gilstate = PyGILState_Ensure();
|
||||
@@ -193,7 +193,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime)
|
||||
return 0.0f;
|
||||
}
|
||||
|
||||
use_gil = 1; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
use_gil = TRUE; /* !PYC_INTERPRETER_ACTIVE; */
|
||||
|
||||
if (use_gil)
|
||||
gilstate = PyGILState_Ensure();
|
||||
|
@@ -660,7 +660,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
PyObject *pyctx = (PyObject *)CTX_py_dict_get(C);
|
||||
PyObject *item = PyDict_GetItemString(pyctx, member);
|
||||
PointerRNA *ptr = NULL;
|
||||
int done = 0;
|
||||
int done = FALSE;
|
||||
|
||||
if (item == NULL) {
|
||||
/* pass */
|
||||
@@ -673,7 +673,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
|
||||
//result->ptr = ((BPy_StructRNA *)item)->ptr;
|
||||
CTX_data_pointer_set(result, ptr->id.data, ptr->type, ptr->data);
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
}
|
||||
else if (PySequence_Check(item)) {
|
||||
PyObject *seq_fast = PySequence_Fast(item, "bpy_context_get sequence conversion");
|
||||
@@ -703,7 +703,7 @@ int BPY_context_member_get(bContext *C, const char *member, bContextDataResult *
|
||||
}
|
||||
Py_DECREF(seq_fast);
|
||||
|
||||
done = 1;
|
||||
done = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user