diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index 63962a310b2..7cba5cb161e 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -262,7 +262,6 @@ void GDExtension::_register_extension_class(GDExtensionClassLibraryPtr p_library p_extension_funcs->get_virtual_func, // GDExtensionClassGetVirtual get_virtual_func; nullptr, // GDExtensionClassGetVirtualCallData get_virtual_call_data_func; nullptr, // GDExtensionClassCallVirtualWithData call_virtual_func; - p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; p_extension_funcs->class_userdata, // void *class_userdata; }; @@ -270,6 +269,7 @@ void GDExtension::_register_extension_class(GDExtensionClassLibraryPtr p_library p_extension_funcs->notification_func, // GDExtensionClassNotification notification_func; p_extension_funcs->free_property_list_func, // GDExtensionClassFreePropertyList free_property_list_func; p_extension_funcs->create_instance_func, // GDExtensionClassCreateInstance create_instance_func; + p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; }; _register_extension_class_internal(p_library, p_class_name, p_parent_class_name, &class_info4, &legacy); } @@ -297,7 +297,6 @@ void GDExtension::_register_extension_class2(GDExtensionClassLibraryPtr p_librar p_extension_funcs->get_virtual_func, // GDExtensionClassGetVirtual get_virtual_func; p_extension_funcs->get_virtual_call_data_func, // GDExtensionClassGetVirtualCallData get_virtual_call_data_func; p_extension_funcs->call_virtual_with_data_func, // GDExtensionClassCallVirtualWithData call_virtual_func; - p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; p_extension_funcs->class_userdata, // void *class_userdata; }; @@ -305,6 +304,7 @@ void GDExtension::_register_extension_class2(GDExtensionClassLibraryPtr p_librar nullptr, // GDExtensionClassNotification notification_func; p_extension_funcs->free_property_list_func, // GDExtensionClassFreePropertyList free_property_list_func; p_extension_funcs->create_instance_func, // GDExtensionClassCreateInstance create_instance_func; + p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; }; _register_extension_class_internal(p_library, p_class_name, p_parent_class_name, &class_info4, &legacy); } @@ -332,7 +332,6 @@ void GDExtension::_register_extension_class3(GDExtensionClassLibraryPtr p_librar p_extension_funcs->get_virtual_func, // GDExtensionClassGetVirtual get_virtual_func; p_extension_funcs->get_virtual_call_data_func, // GDExtensionClassGetVirtualCallData get_virtual_call_data_func; p_extension_funcs->call_virtual_with_data_func, // GDExtensionClassCallVirtualWithData call_virtual_func; - p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; p_extension_funcs->class_userdata, // void *class_userdata; }; @@ -340,6 +339,7 @@ void GDExtension::_register_extension_class3(GDExtensionClassLibraryPtr p_librar nullptr, // GDExtensionClassNotification notification_func; nullptr, // GDExtensionClassFreePropertyList free_property_list_func; p_extension_funcs->create_instance_func, // GDExtensionClassCreateInstance2 create_instance_func; + p_extension_funcs->get_rid_func, // GDExtensionClassGetRID get_rid; }; _register_extension_class_internal(p_library, p_class_name, p_parent_class_name, &class_info4, &legacy); } @@ -427,6 +427,7 @@ void GDExtension::_register_extension_class_internal(GDExtensionClassLibraryPtr extension->gdextension.notification = p_deprecated_funcs->notification_func; extension->gdextension.free_property_list = p_deprecated_funcs->free_property_list_func; extension->gdextension.create_instance = p_deprecated_funcs->create_instance_func; + extension->gdextension.get_rid = p_deprecated_funcs->get_rid_func; } #endif // DISABLE_DEPRECATED extension->gdextension.notification2 = p_extension_funcs->notification_func; @@ -440,7 +441,6 @@ void GDExtension::_register_extension_class_internal(GDExtensionClassLibraryPtr extension->gdextension.get_virtual = p_extension_funcs->get_virtual_func; extension->gdextension.get_virtual_call_data = p_extension_funcs->get_virtual_call_data_func; extension->gdextension.call_virtual_with_data = p_extension_funcs->call_virtual_with_data_func; - extension->gdextension.get_rid = p_extension_funcs->get_rid_func; extension->gdextension.reloadable = self->reloadable; #ifdef TOOLS_ENABLED diff --git a/core/extension/gdextension.h b/core/extension/gdextension.h index 7bb4294909a..706bc7e1896 100644 --- a/core/extension/gdextension.h +++ b/core/extension/gdextension.h @@ -71,6 +71,7 @@ class GDExtension : public Resource { GDExtensionClassNotification notification_func = nullptr; GDExtensionClassFreePropertyList free_property_list_func = nullptr; GDExtensionClassCreateInstance create_instance_func = nullptr; + GDExtensionClassGetRID get_rid_func = nullptr; #endif // DISABLE_DEPRECATED }; diff --git a/core/extension/gdextension_interface.h b/core/extension/gdextension_interface.h index d3132baf1b4..8eb8a2ed33e 100644 --- a/core/extension/gdextension_interface.h +++ b/core/extension/gdextension_interface.h @@ -392,7 +392,6 @@ typedef struct { GDExtensionClassGetVirtualCallData get_virtual_call_data_func; // Used to call virtual functions when `get_virtual_call_data_func` is not null. GDExtensionClassCallVirtualWithData call_virtual_with_data_func; - GDExtensionClassGetRID get_rid_func; void *class_userdata; // Per-class user data, later accessible in instance bindings. } GDExtensionClassCreationInfo4;