diff options
author | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2022-11-10 15:57:56 +0100 |
---|---|---|
committer | Emmanuel Leblond <emmanuel.leblond@gmail.com> | 2022-11-12 04:18:21 +0100 |
commit | 39c039a363497d60c63cf58a7b83723b11df2894 (patch) | |
tree | 59072d1a3ac5dedbbf51a6339c78d9b7f4004fe0 /core/extension | |
parent | dca5cb8e40fd2a348a59ea73c597eb742c14c980 (diff) |
Revert removal of GDNativeExtensionScriptInstanceInfo::get_property_type_func in GDExtension
This function pointer is needed to stay close to internal Godot's ScriptInstance class.
Besides, by removing this function pointer, we had to do property list create/free each time
we want to access type which is quadratic complexity :/
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdnative_interface.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 68eed5a161..a361e40096 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -309,6 +309,7 @@ typedef GDNativeBool (*GDNativeExtensionScriptInstanceSet)(GDNativeExtensionScri typedef GDNativeBool (*GDNativeExtensionScriptInstanceGet)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); typedef const GDNativePropertyInfo *(*GDNativeExtensionScriptInstanceGetPropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, uint32_t *r_count); typedef void (*GDNativeExtensionScriptInstanceFreePropertyList)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativePropertyInfo *p_list); +typedef GDNativeVariantType (*GDNativeExtensionScriptInstanceGetPropertyType)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeBool *r_is_valid); typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyCanRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name); typedef GDNativeBool (*GDNativeExtensionScriptInstancePropertyGetRevert)(GDNativeExtensionScriptInstanceDataPtr p_instance, const GDNativeStringNamePtr p_name, GDNativeVariantPtr r_ret); @@ -354,6 +355,7 @@ typedef struct { GDNativeExtensionScriptInstanceGetMethodList get_method_list_func; GDNativeExtensionScriptInstanceFreeMethodList free_method_list_func; + GDNativeExtensionScriptInstanceGetPropertyType get_property_type_func; GDNativeExtensionScriptInstanceHasMethod has_method_func; |