summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authorPaul Joannon <hello@pauljoannon.com>2018-01-17 20:29:44 +0100
committerPaul Joannon <hello@pauljoannon.com>2018-01-18 10:31:36 +0100
commit1de5f7e70b9e072e5746ba817fb418bc71b1e696 (patch)
treedb9b92d804284e59b27fa75068b19443c09272bd /modules/mono
parentfd3011ca9ccc63cd759e75d253b9fec0a2d2a1c3 (diff)
fix marshalling when a function is returning an object from c#
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 7df2043a62..aee2481366 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1044,7 +1044,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const {
if (field) {
MonoObject *value = field->get_value(mono_object);
- r_ret = GDMonoMarshal::mono_object_to_variant(value, field->get_type());
+ r_ret = GDMonoMarshal::mono_object_to_variant(value);
return true;
}
@@ -1057,7 +1057,7 @@ bool CSharpInstance::get(const StringName &p_name, Variant &r_ret) const {
r_ret = Variant();
GDMonoUtils::print_unhandled_exception(exc);
} else {
- r_ret = GDMonoMarshal::mono_object_to_variant(value, property->get_type());
+ r_ret = GDMonoMarshal::mono_object_to_variant(value);
}
return true;
}
@@ -1147,7 +1147,7 @@ Variant CSharpInstance::call(const StringName &p_method, const Variant **p_args,
MonoObject *return_value = method->invoke(mono_object, p_args);
if (return_value) {
- return GDMonoMarshal::mono_object_to_variant(return_value, method->get_return_type());
+ return GDMonoMarshal::mono_object_to_variant(return_value);
} else {
return Variant();
}
@@ -1633,7 +1633,7 @@ Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, i
MonoObject *result = method->invoke(NULL, p_args);
if (result) {
- return GDMonoMarshal::mono_object_to_variant(result, method->get_return_type());
+ return GDMonoMarshal::mono_object_to_variant(result);
} else {
return Variant();
}