summaryrefslogtreecommitdiffstats
path: root/modules/mono/mono_gd/gd_mono_property.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2020-12-06 09:41:03 +0100
committerGitHub <noreply@github.com>2020-12-06 09:41:03 +0100
commitd834789f475d431b10dcaef8804cd75dcd8b47dd (patch)
tree2d6561ce32b45bcb57aec90ccd715bb91f0486b7 /modules/mono/mono_gd/gd_mono_property.cpp
parent286ad957490642b3aaa70829efbfdc28904513df (diff)
parenta946f84e3d115ed313dbe511ba33390fc204fd11 (diff)
downloadredot-engine-d834789f475d431b10dcaef8804cd75dcd8b47dd.tar.gz
Merge pull request #44106 from neikeq/mono-invoke-no-params-boxing
Don't box params on Native->C# calls with Variant params
Diffstat (limited to 'modules/mono/mono_gd/gd_mono_property.cpp')
-rw-r--r--modules/mono/mono_gd/gd_mono_property.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/modules/mono/mono_gd/gd_mono_property.cpp b/modules/mono/mono_gd/gd_mono_property.cpp
index bc3be97102..1027c08a4a 100644
--- a/modules/mono/mono_gd/gd_mono_property.cpp
+++ b/modules/mono/mono_gd/gd_mono_property.cpp
@@ -149,10 +149,9 @@ bool GDMonoProperty::has_setter() {
void GDMonoProperty::set_value(MonoObject *p_object, MonoObject *p_value, MonoException **r_exc) {
MonoMethod *prop_method = mono_property_get_set_method(mono_property);
- MonoArray *params = mono_array_new(mono_domain_get(), CACHED_CLASS_RAW(MonoObject), 1);
- mono_array_setref(params, 0, p_value);
+ void *params[1] = { p_value };
MonoException *exc = nullptr;
- GDMonoUtils::runtime_invoke_array(prop_method, p_object, params, &exc);
+ GDMonoUtils::runtime_invoke(prop_method, p_object, params, &exc);
if (exc) {
if (r_exc) {
*r_exc = exc;