Cleanup: use actual function type instead of void* in declaration

This updates the signature of `RNA_def_property_update_runtime`
which previously just has a `const void *` input. This made it difficult
to know what function signature is expected and also does not result
in compile errors when a wrong function is provided.

There is one case which required a different signature, so now there
is a separat function for that case.
This commit is contained in:
Jacques Lucke
2023-08-09 22:40:39 +02:00
parent 19912457c6
commit 08a8825827
13 changed files with 34 additions and 23 deletions

View File

@@ -2267,10 +2267,8 @@ static void bpy_prop_callback_assign_update(PropertyRNA *prop, PyObject *update_
if (update_fn && update_fn != Py_None) {
BPyPropStore *prop_store = bpy_prop_py_data_ensure(prop);
RNA_def_property_update_runtime(prop, reinterpret_cast<const void *>(bpy_prop_update_fn));
RNA_def_property_update_runtime_with_context_and_property(prop, bpy_prop_update_fn);
ASSIGN_PYOBJECT_INCREF(prop_store->py_data.update_fn, update_fn);
RNA_def_property_flag(prop, PROP_CONTEXT_PROPERTY_UPDATE);
}
}