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:
authorCampbell Barton <ideasman42@gmail.com>2013-10-16 09:29:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-10-16 09:29:28 +0400
commit089d0ad8f9d227b3cadd56184578e163ac5589f8 (patch)
tree44ba84d1ec1946927c1dbcfb4a66bc39b07af1a7 /source/blender/makesrna/intern/rna_access.c
parentf12ac5b23f27882446ea6620216d9be863183e50 (diff)
add IDP_FreeFromGroup(), replaces IDP_RemFromGroup(), IDP_FreeProperty(), MEM_freeN().
Diffstat (limited to 'source/blender/makesrna/intern/rna_access.c')
-rw-r--r--source/blender/makesrna/intern/rna_access.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_access.c b/source/blender/makesrna/intern/rna_access.c
index 9a8533ec6a1..fe457a14718 100644
--- a/source/blender/makesrna/intern/rna_access.c
+++ b/source/blender/makesrna/intern/rna_access.c
@@ -290,9 +290,7 @@ static void rna_idproperty_free(PointerRNA *ptr, const char *name)
if (group) {
IDProperty *idprop = IDP_GetPropertyFromGroup(group, name);
if (idprop) {
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
}
}
}
@@ -423,9 +421,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
if (idprop && !rna_idproperty_verify_valid(ptr, *prop, idprop)) {
IDProperty *group = RNA_struct_idprops(ptr, 0);
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
return NULL;
}
@@ -596,9 +592,7 @@ bool RNA_struct_idprops_unset(PointerRNA *ptr, const char *identifier)
if (group) {
IDProperty *idp = IDP_GetPropertyFromGroup(group, identifier);
if (idp) {
- IDP_RemFromGroup(group, idp);
- IDP_FreeProperty(idp);
- MEM_freeN(idp);
+ IDP_FreeFromGroup(group, idp);
return true;
}
@@ -2771,9 +2765,7 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
group = RNA_struct_idprops(ptr, 0);
if (group) {
- IDP_RemFromGroup(group, idprop);
- IDP_FreeProperty(idprop);
- MEM_freeN(idprop);
+ IDP_FreeFromGroup(group, idprop);
}
}
else