summaryrefslogtreecommitdiff
path: root/modules/mono
diff options
context:
space:
mode:
authortoasteater <48371905+toasteater@users.noreply.github.com>2019-08-26 16:36:51 +0000
committertoasteater <48371905+toasteater@users.noreply.github.com>2019-08-26 16:36:51 +0000
commite2121c97ae4e1c0d94eb3caf29118a28a31fdca3 (patch)
tree70e256d14ae2faa3be51b3b323fcc5e9f6278fab /modules/mono
parent791d7f78b52f5b828aa5541897e12c6a1861ef6f (diff)
Make VarArg methods return types show up as Variant in API json
VarArg methods have the return type Object in the API json for GDNative. This can cause undefined behavior in some language bindings due to lack of documentation on VarArg methods' behavior. This changes the MethodInfo of: - CSharpScript::_new - GDScript::_new - PluginScript::_new
Diffstat (limited to 'modules/mono')
-rw-r--r--modules/mono/csharp_script.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 8c17bac3c9..4c9dd9c1a9 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -2661,7 +2661,7 @@ void CSharpScript::_get_property_list(List<PropertyInfo> *p_properties) const {
void CSharpScript::_bind_methods() {
- ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &CSharpScript::_new, MethodInfo(Variant::OBJECT, "new"));
+ ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &CSharpScript::_new, MethodInfo("new"));
}
Ref<CSharpScript> CSharpScript::create_for_managed_type(GDMonoClass *p_class, GDMonoClass *p_native) {