add IDP_FreeFromGroup(), replaces IDP_RemFromGroup(), IDP_FreeProperty(), MEM_freeN().

This commit is contained in:
2013-10-16 05:29:28 +00:00
parent f12ac5b23f
commit 089d0ad8f9
5 changed files with 20 additions and 21 deletions

View File

@@ -496,9 +496,7 @@ int BPy_Wrap_SetMapItem(IDProperty *prop, PyObject *key, PyObject *val)
if (val == NULL) { /* del idprop[key] */
IDProperty *pkey = IDP_GetPropertyFromGroup(prop, _PyUnicode_AsString(key));
if (pkey) {
IDP_RemFromGroup(prop, pkey);
IDP_FreeProperty(pkey);
MEM_freeN(pkey);
IDP_FreeFromGroup(prop, pkey);
return 0;
}
else {
@@ -670,7 +668,7 @@ static PyObject *BPy_IDGroup_Pop(BPy_IDProperty *self, PyObject *value)
return NULL;
}
IDP_RemFromGroup(self->prop, idprop);
IDP_RemoveFromGroup(self->prop, idprop);
return pyform;
}