You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Collapse the gdextension arguments into the GDExtensionData struct
This is used to reduce the number of arguments to `OS::open_dynamic_library(...)`.
This commit is contained in:
@@ -784,7 +784,7 @@ String OS_Unix::get_locale() const {
|
||||
return locale;
|
||||
}
|
||||
|
||||
Error OS_Unix::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_Unix::open_dynamic_library(const String &p_path, void *&p_library_handle, GDExtensionData *p_data) {
|
||||
String path = p_path;
|
||||
|
||||
if (FileAccess::exists(path) && path.is_relative_path()) {
|
||||
@@ -808,8 +808,8 @@ Error OS_Unix::open_dynamic_library(const String &p_path, void *&p_library_handl
|
||||
p_library_handle = dlopen(path.utf8().get_data(), GODOT_DLOPEN_MODE);
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user