Merge pull request #27184 from karroffel/gdnative-api-gen-fixes

fix GDNative binding generation for object types
This commit is contained in:
Rémi Verschelde 2019-03-27 17:07:18 +01:00 committed by GitHub
commit f27931f365
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -279,7 +279,7 @@ List<ClassAPI> generate_c_api_classes() {
MethodInfo &method_info = m->get();
//method name
method_api.method_name = m->get().name;
method_api.method_name = method_info.name;
//method return type
if (method_api.method_name.find(":") != -1) {
method_api.return_type = method_api.method_name.get_slice(":", 1);
@ -321,6 +321,8 @@ List<ClassAPI> generate_c_api_classes() {
arg_type = arg_info.hint_string;
} else if (arg_info.type == Variant::NIL) {
arg_type = "Variant";
} else if (arg_info.type == Variant::OBJECT) {
arg_type = arg_info.class_name;
} else {
arg_type = Variant::get_type_name(arg_info.type);
}