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/python/generic/idprop_py_api.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/python/generic/idprop_py_api.c')
-rw-r--r--source/blender/python/generic/idprop_py_api.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/python/generic/idprop_py_api.c b/source/blender/python/generic/idprop_py_api.c
index dd5baaa661c..30cad991b55 100644
--- a/source/blender/python/generic/idprop_py_api.c
+++ b/source/blender/python/generic/idprop_py_api.c
@@ -601,7 +601,6 @@ static IDProperty *idp_from_PyMapping(const char *name, PyObject *ob)
pval = PySequence_GetItem(vals, i);
if (BPy_IDProperty_Map_ValidateAndCreate(key, prop, pval) == false) {
IDP_FreeProperty(prop);
- MEM_freeN(prop);
Py_XDECREF(keys);
Py_XDECREF(vals);
Py_XDECREF(key);
@@ -690,7 +689,7 @@ bool BPy_IDProperty_Map_ValidateAndCreate(PyObject *name_obj, IDProperty *group,
prop->prev = prop_exist->prev;
prop->next = prop_exist->next;
- IDP_FreeProperty(prop_exist);
+ IDP_FreePropertyContent(prop_exist);
*prop_exist = *prop;
MEM_freeN(prop);
}