RNA API: use bool's for enum itemf callbacks.

This commit is contained in:
2014-01-04 18:08:43 +11:00
parent b9114cb609
commit 6734936c13
53 changed files with 233 additions and 226 deletions

View File

@@ -1430,7 +1430,7 @@ static EnumPropertyItem *enum_items_from_py(PyObject *seq_fast, PyObject *def, i
return items;
}
static EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, int *free)
static EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *ptr, PropertyRNA *prop, bool *r_free)
{
PyGILState_STATE gilstate;
@@ -1483,7 +1483,7 @@ static EnumPropertyItem *bpy_prop_enum_itemf_cb(struct bContext *C, PointerRNA *
}
if (err != -1) { /* worked */
*free = 1;
*r_free = true;
}
else {
printf_func_error(py_func);

View File

@@ -1126,7 +1126,7 @@ static const char *pyrna_enum_as_string(PointerRNA *ptr, PropertyRNA *prop)
{
EnumPropertyItem *item;
const char *result;
int free = false;
bool free = false;
RNA_property_enum_items(BPy_GetContext(), ptr, prop, &item, NULL, &free);
if (item) {
@@ -1205,7 +1205,7 @@ static int pyrna_prop_to_enum_bitfield(PointerRNA *ptr, PropertyRNA *prop, PyObj
{
EnumPropertyItem *item;
int ret;
int free = false;
bool free = false;
*r_value = 0;
@@ -1285,7 +1285,7 @@ static PyObject *pyrna_enum_to_py(PointerRNA *ptr, PropertyRNA *prop, int val)
}
else {
EnumPropertyItem *enum_item;
int free = false;
bool free = false;
/* don't throw error here, can't trust blender 100% to give the
* right values, python code should not generate error for that */