mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
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
This commit is contained in:
parent
791d7f78b5
commit
e2121c97ae
4 changed files with 4 additions and 4 deletions
|
@ -710,7 +710,7 @@ void GDScript::_get_property_list(List<PropertyInfo> *p_properties) const {
|
|||
|
||||
void GDScript::_bind_methods() {
|
||||
|
||||
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &GDScript::_new, MethodInfo(Variant::OBJECT, "new"));
|
||||
ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &GDScript::_new, MethodInfo("new"));
|
||||
|
||||
ClassDB::bind_method(D_METHOD("get_as_byte_code"), &GDScript::get_as_byte_code);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue