Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <mail@jlucke.com>2019-05-16 15:11:11 +0300
committerJacques Lucke <mail@jlucke.com>2019-05-16 15:11:11 +0300
commitdb5120603f8f6236d1417199f257e35e0eb8c00b (patch)
treeb2c55dedaf2b49ac8abd4f50878bcf374e71cccb /source/blender/makesrna/intern/rna_access.c
parentc0d743238d022e12872549176257db8b9d602e3d (diff)
Refactor: Simplify ID Property freeing
This also makes `IDP_CopyProperty` the "opposite" of `IDP_FreeProperty`, which is what I'd expect. Two refactoring steps: * rename IDP_FreeProperty to IDP_FreePropertyContent * new IDP_FreeProperty function that actually frees the property Reviewers: brecht Differential Revision: https://developer.blender.org/D4872
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index d5dfd0b5503..a12951d9796 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -302,7 +302,7 @@ static IDProperty *rna_idproperty_ui_ensure(PointerRNA *ptr, PropertyRNA *prop,
idprop = IDP_New(IDP_GROUP, &dummy, RNA_IDP_UI);
if (!IDP_AddToGroup(props, idprop)) {
- IDP_FreeProperty(idprop);
+ IDP_FreePropertyContent(idprop);
return NULL;
}
}
@@ -316,7 +316,7 @@ static IDProperty *rna_idproperty_ui_ensure(PointerRNA *ptr, PropertyRNA *prop,
rv = IDP_New(IDP_GROUP, &dummy, name);
if (!IDP_AddToGroup(idprop, rv)) {
- IDP_FreeProperty(rv);
+ IDP_FreePropertyContent(rv);
return NULL;
}
}
@@ -370,7 +370,7 @@ static bool rna_idproperty_ui_set_default(PointerRNA *ptr,
item = IDP_New(type, value, "default");
if (!IDP_AddToGroup(idp_ui, item)) {
- IDP_FreeProperty(item);
+ IDP_FreePropertyContent(item);
return false;
}
}
@@ -3961,7 +3961,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
item = IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
/* IDP_AppendArray does a shallow copy (memcpy), only free memory */
- /* IDP_FreeProperty(item); */
+ /* IDP_FreePropertyContent(item); */
MEM_freeN(item);
rna_idproperty_touch(idprop);
}
@@ -3977,7 +3977,7 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
item = IDP_New(IDP_GROUP, &val, "");
IDP_AppendArray(idprop, item);
/* IDP_AppendArray does a shallow copy (memcpy), only free memory */
- /* IDP_FreeProperty(item); */
+ /* IDP_FreePropertyContent(item); */
MEM_freeN(item);
}
}