summaryrefslogtreecommitdiffstats
path: root/platform/ios
diff options
context:
space:
mode:
authorFredia Huya-Kouadio <fhuyakou@gmail.com>2024-04-19 07:14:05 -0700
committerFredia Huya-Kouadio <fhuyakou@gmail.com>2024-04-19 07:56:02 -0700
commit764de7fe3195c28be1d9b8abc26ffdf394e87cb3 (patch)
treeb31221f380e958f3bb1d92b38bae14423553cfdc /platform/ios
parentede88cf59d20da54042f16df3fe6ab1aca760d64 (diff)
downloadredot-engine-764de7fe3195c28be1d9b8abc26ffdf394e87cb3.tar.gz
Collapse the gdextension arguments into the `GDExtensionData` struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
Diffstat (limited to 'platform/ios')
-rw-r--r--platform/ios/os_ios.h2
-rw-r--r--platform/ios/os_ios.mm10
2 files changed, 6 insertions, 6 deletions
diff --git a/platform/ios/os_ios.h b/platform/ios/os_ios.h
index 5a775c6f12..c4782a4768 100644
--- a/platform/ios/os_ios.h
+++ b/platform/ios/os_ios.h
@@ -103,7 +103,7 @@ public:
virtual Vector<String> get_system_font_path_for_text(const String &p_font_name, const String &p_text, const String &p_locale = String(), const String &p_script = String(), int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
virtual String get_system_font_path(const String &p_font_name, int p_weight = 400, int p_stretch = 100, bool p_italic = false) const override;
- virtual Error open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path = false, String *r_resolved_path = nullptr, bool p_generate_temp_files = false, PackedStringArray *p_library_dependencies = nullptr) override;
+ virtual Error open_dynamic_library(const String &p_path, void *&p_library_handle, GDExtensionData *p_data = nullptr) override;
virtual Error close_dynamic_library(void *p_library_handle) override;
virtual Error get_dynamic_library_symbol_handle(void *p_library_handle, const String &p_name, void *&p_symbol_handle, bool p_optional = false) override;
diff --git a/platform/ios/os_ios.mm b/platform/ios/os_ios.mm
index 18e6087467..52d496d641 100644
--- a/platform/ios/os_ios.mm
+++ b/platform/ios/os_ios.mm
@@ -217,13 +217,13 @@ _FORCE_INLINE_ String OS_IOS::get_framework_executable(const String &p_path) {
return p_path;
}
-Error OS_IOS::open_dynamic_library(const String &p_path, void *&p_library_handle, bool p_also_set_library_path, String *r_resolved_path, bool p_generate_temp_files, PackedStringArray *p_library_dependencies) {
+Error OS_IOS::open_dynamic_library(const String &p_path, void *&p_library_handle, GDExtensionData *p_data) {
if (p_path.length() == 0) {
// Static xcframework.
p_library_handle = RTLD_SELF;
- if (r_resolved_path != nullptr) {
- *r_resolved_path = p_path;
+ if (p_data != nullptr && p_data->r_resolved_path != nullptr) {
+ *p_data->r_resolved_path = p_path;
}
return OK;
@@ -256,8 +256,8 @@ Error OS_IOS::open_dynamic_library(const String &p_path, void *&p_library_handle
p_library_handle = dlopen(path.utf8().get_data(), RTLD_NOW);
ERR_FAIL_NULL_V_MSG(p_library_handle, ERR_CANT_OPEN, vformat("Can't open dynamic library: %s. Error: %s.", p_path, dlerror()));
- if (r_resolved_path != nullptr) {
- *r_resolved_path = path;
+ if (p_data != nullptr && p_data->r_resolved_path != nullptr) {
+ *p_data->r_resolved_path = path;
}
return OK;