summaryrefslogtreecommitdiff
path: root/modules/gdnative/nativescript/api_generator.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2019-03-27 17:07:18 +0100
committerGitHub <noreply@github.com>2019-03-27 17:07:18 +0100
commitf27931f365e3428b04cbb70cf278bd5a9d101724 (patch)
treee27b4f4ebc3a3d91891d009b9e58baee2878f2d5 /modules/gdnative/nativescript/api_generator.cpp
parent9d7343a1a36713d364e2457e4c12b703e8b539fa (diff)
parent197d642014b11b85b8172e7633c0fe8eb4f03b84 (diff)
Merge pull request #27184 from karroffel/gdnative-api-gen-fixes
fix GDNative binding generation for object types
Diffstat (limited to 'modules/gdnative/nativescript/api_generator.cpp')
-rw-r--r--modules/gdnative/nativescript/api_generator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdnative/nativescript/api_generator.cpp b/modules/gdnative/nativescript/api_generator.cpp
index b99c5d31ab..7eb4294732 100644
--- a/modules/gdnative/nativescript/api_generator.cpp
+++ b/modules/gdnative/nativescript/api_generator.cpp
@@ -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);
}