diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-10-16 11:51:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-16 11:51:21 +0200 |
commit | 767f8fb483851a210f170956e238e8b0cefa3834 (patch) | |
tree | 4d5808f39581deacc59f75cd1414a75d199e1c15 /core/extension | |
parent | dc4b6165962536b53c4c1471fcf0be43c70e2335 (diff) | |
parent | 1d5aa74ac3a3967401dd4028d846403ce6c2011c (diff) |
Merge pull request #66979 from rburing/gdextension_abstract_class
GDExtension: add support for virtual and abstract classes
Diffstat (limited to 'core/extension')
-rw-r--r-- | core/extension/gdnative_interface.h | 2 | ||||
-rw-r--r-- | core/extension/native_extension.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/core/extension/gdnative_interface.h b/core/extension/gdnative_interface.h index 4513c66ab5..1ce50bc186 100644 --- a/core/extension/gdnative_interface.h +++ b/core/extension/gdnative_interface.h @@ -234,6 +234,8 @@ typedef void (*GDNativeExtensionClassFreeInstance)(void *p_userdata, GDExtension typedef GDNativeExtensionClassCallVirtual (*GDNativeExtensionClassGetVirtual)(void *p_userdata, const char *p_name); typedef struct { + GDNativeBool is_virtual; + GDNativeBool is_abstract; GDNativeExtensionClassSet set_func; GDNativeExtensionClassGet get_func; GDNativeExtensionClassGetPropertyList get_property_list_func; diff --git a/core/extension/native_extension.cpp b/core/extension/native_extension.cpp index 6418da2235..cc019584a5 100644 --- a/core/extension/native_extension.cpp +++ b/core/extension/native_extension.cpp @@ -152,6 +152,8 @@ void NativeExtension::_register_extension_class(const GDNativeExtensionClassLibr extension->native_extension.parent_class_name = parent_class_name; extension->native_extension.class_name = class_name; extension->native_extension.editor_class = self->level_initialized == INITIALIZATION_LEVEL_EDITOR; + extension->native_extension.is_virtual = p_extension_funcs->is_virtual; + extension->native_extension.is_abstract = p_extension_funcs->is_abstract; extension->native_extension.set = p_extension_funcs->set_func; extension->native_extension.get = p_extension_funcs->get_func; extension->native_extension.get_property_list = p_extension_funcs->get_property_list_func; |