diff options
author | toasteater <48371905+toasteater@users.noreply.github.com> | 2019-08-26 16:36:51 +0000 |
---|---|---|
committer | toasteater <48371905+toasteater@users.noreply.github.com> | 2019-08-26 16:36:51 +0000 |
commit | e2121c97ae4e1c0d94eb3caf29118a28a31fdca3 (patch) | |
tree | 70e256d14ae2faa3be51b3b323fcc5e9f6278fab /modules/gdnative/nativescript/nativescript.cpp | |
parent | 791d7f78b52f5b828aa5541897e12c6a1861ef6f (diff) | |
download | redot-engine-e2121c97ae4e1c0d94eb3caf29118a28a31fdca3.tar.gz |
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/gdnative/nativescript/nativescript.cpp')
-rw-r--r-- | modules/gdnative/nativescript/nativescript.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdnative/nativescript/nativescript.cpp b/modules/gdnative/nativescript/nativescript.cpp index 9f7c3880ec..7c313c983f 100644 --- a/modules/gdnative/nativescript/nativescript.cpp +++ b/modules/gdnative/nativescript/nativescript.cpp @@ -79,7 +79,7 @@ void NativeScript::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::STRING, "script_class_name"), "set_script_class_name", "get_script_class_name"); ADD_PROPERTY(PropertyInfo(Variant::STRING, "script_class_icon_path", PROPERTY_HINT_FILE), "set_script_class_icon_path", "get_script_class_icon_path"); - ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &NativeScript::_new, MethodInfo(Variant::OBJECT, "new")); + ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &NativeScript::_new, MethodInfo("new")); } #define NSL NativeScriptLanguage::get_singleton() |