summaryrefslogtreecommitdiffstats
path: root/modules/mono
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2024-09-17 17:51:17 +0200
committerRaul Santos <raulsntos@gmail.com>2024-09-17 17:51:17 +0200
commit5860ec553df6d70901084d0b6ae9f403221751d1 (patch)
tree137b2a84a9592926cd7a669eb0c6dcae27dced74 /modules/mono
parent02b16d2f544e323b7b7f57e6e992b0b8e5d8b954 (diff)
downloadredot-engine-5860ec553df6d70901084d0b6ae9f403221751d1.tar.gz
C#: Use `char *` with CoreCLR/MonoVM APIs
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/mono_gd/gd_mono.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/mono/mono_gd/gd_mono.cpp b/modules/mono/mono_gd/gd_mono.cpp
index 5293c5c896..6abf0193cf 100644
--- a/modules/mono/mono_gd/gd_mono.cpp
+++ b/modules/mono/mono_gd/gd_mono.cpp
@@ -464,8 +464,8 @@ godot_plugins_initialize_fn initialize_coreclr_and_godot_plugins(bool &r_runtime
String assembly_name = path::get_csharp_project_name();
String tpa_list = make_tpa_list();
- const char *prop_keys[] = { HOSTFXR_STR("TRUSTED_PLATFORM_ASSEMBLIES") };
- const char *prop_values[] = { get_data(str_to_hostfxr(tpa_list)) };
+ const char *prop_keys[] = { "TRUSTED_PLATFORM_ASSEMBLIES" };
+ const char *prop_values[] = { tpa_list.utf8().get_data() };
int nprops = sizeof(prop_keys) / sizeof(prop_keys[0]);
void *coreclr_handle = nullptr;
@@ -478,9 +478,9 @@ godot_plugins_initialize_fn initialize_coreclr_and_godot_plugins(bool &r_runtime
print_verbose(".NET: CoreCLR initialized");
coreclr_create_delegate(coreclr_handle, domain_id,
- get_data(str_to_hostfxr(assembly_name)),
- HOSTFXR_STR("GodotPlugins.Game.Main"),
- HOSTFXR_STR("InitializeFromGameProject"),
+ assembly_name.utf8().get_data(),
+ "GodotPlugins.Game.Main",
+ "InitializeFromGameProject",
(void **)&godot_plugins_initialize);
ERR_FAIL_NULL_V_MSG(godot_plugins_initialize, nullptr, ".NET: Failed to get GodotPlugins initialization function pointer");