diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-07-30 09:04:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-07-30 09:04:08 +0300 |
commit | 63f7eceb53085ef40cad4dc2343dbe608be999c1 (patch) | |
tree | 3693197648bee66463e0b784bfc527df9d9f21fc /source/blender/makesrna/RNA_define.h | |
parent | d06b03f80da5ce7a5c833f25be783df3b4bc4c00 (diff) |
PyAPI: defer freeing existing properties on registration
Registering a property could remove the existing property,
then fail to parse one of the arguments of the new property -
leaving the struct without a property.
Now freeing the existing property is deferred until immediately
before the new property is registered.
Diffstat (limited to 'source/blender/makesrna/RNA_define.h')
-rw-r--r-- | source/blender/makesrna/RNA_define.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/makesrna/RNA_define.h b/source/blender/makesrna/RNA_define.h index a31182b2f5a..01e26cbb41c 100644 --- a/source/blender/makesrna/RNA_define.h +++ b/source/blender/makesrna/RNA_define.h @@ -506,6 +506,11 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA void RNA_def_property_free_pointers(PropertyRNA *prop); int RNA_def_property_free_identifier(StructOrFunctionRNA *cont_, const char *identifier); +int RNA_def_property_free_identifier_deferred_prepare(StructOrFunctionRNA *cont_, + const char *identifier, + void **handle); +void RNA_def_property_free_identifier_deferred_finish(StructOrFunctionRNA *cont_, void *handle); + void RNA_def_property_free_pointers_set_py_data_callback( void (*py_data_clear_fn)(PropertyRNA *prop)); |