summaryrefslogtreecommitdiff
path: root/modules/gdnative/nativescript
diff options
context:
space:
mode:
authorkarroffel <therzog@mail.de>2019-03-17 21:23:37 +0100
committerkarroffel <therzog@mail.de>2019-03-17 21:31:26 +0100
commit197d642014b11b85b8172e7633c0fe8eb4f03b84 (patch)
tree065418d121a67e51c736370d23d103f6bf36d810 /modules/gdnative/nativescript
parentdf7d3708c5b535c3696943322a14ec19a175e30c (diff)
fix GDNative binding generation for object types
Diffstat (limited to 'modules/gdnative/nativescript')
-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);
}