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
This commit is contained in:
2019-05-16 14:11:11 +02:00
parent c0d743238d
commit db5120603f
37 changed files with 23 additions and 75 deletions

View File

@@ -1122,7 +1122,6 @@ static void pyrna_struct_dealloc(BPy_StructRNA *self)
#ifdef PYRNA_FREE_SUPPORT
if (self->freeptr && self->ptr.data) {
IDP_FreeProperty(self->ptr.data);
MEM_freeN(self->ptr.data);
self->ptr.data = NULL;
}
#endif /* PYRNA_FREE_SUPPORT */