From e2121c97ae4e1c0d94eb3caf29118a28a31fdca3 Mon Sep 17 00:00:00 2001 From: toasteater <48371905+toasteater@users.noreply.github.com> Date: Mon, 26 Aug 2019 16:36:51 +0000 Subject: 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 --- modules/gdnative/pluginscript/pluginscript_script.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdnative/pluginscript/pluginscript_script.cpp') diff --git a/modules/gdnative/pluginscript/pluginscript_script.cpp b/modules/gdnative/pluginscript/pluginscript_script.cpp index b82823ab64..94d38e1be1 100644 --- a/modules/gdnative/pluginscript/pluginscript_script.cpp +++ b/modules/gdnative/pluginscript/pluginscript_script.cpp @@ -50,7 +50,7 @@ #endif void PluginScript::_bind_methods() { - ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &PluginScript::_new, MethodInfo(Variant::OBJECT, "new")); + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &PluginScript::_new, MethodInfo("new")); } PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Variant::CallError &r_error) { -- cgit v1.2.3