|
@@ -415,7 +415,7 @@ public:
|
|
|
|
|
|
#endif
|
|
#endif
|
|
template<class M>
|
|
template<class M>
|
|
- static MethodBind* bind_native_method(uint32_t p_flags, const StringName& p_name, M p_method,const MethodInfo& p_info=MethodInfo(),const Vector<Variant>& p_default_args=Vector<Variant>()) {
|
|
|
|
|
|
+ static MethodBind* bind_native_method(uint32_t p_flags, StringName p_name, M p_method,const MethodInfo& p_info=MethodInfo(),const Vector<Variant>& p_default_args=Vector<Variant>()) {
|
|
|
|
|
|
GLOBAL_LOCK_FUNCTION;
|
|
GLOBAL_LOCK_FUNCTION;
|
|
|
|
|
|
@@ -423,6 +423,13 @@ public:
|
|
|
|
|
|
MethodBind *bind = create_native_method_bind(p_method,p_info);
|
|
MethodBind *bind = create_native_method_bind(p_method,p_info);
|
|
ERR_FAIL_COND_V(!bind,NULL);
|
|
ERR_FAIL_COND_V(!bind,NULL);
|
|
|
|
+
|
|
|
|
+ String rettype;
|
|
|
|
+ if (p_name.operator String().find(":")!=-1) {
|
|
|
|
+ rettype = p_name.operator String().get_slice(":",1);
|
|
|
|
+ p_name = p_name.operator String().get_slice(":",0);
|
|
|
|
+ }
|
|
|
|
+
|
|
bind->set_name(p_name);
|
|
bind->set_name(p_name);
|
|
bind->set_default_arguments(p_default_args);
|
|
bind->set_default_arguments(p_default_args);
|
|
|
|
|
|
@@ -442,6 +449,8 @@ public:
|
|
}
|
|
}
|
|
type->method_map[p_name]=bind;
|
|
type->method_map[p_name]=bind;
|
|
#ifdef DEBUG_METHODS_ENABLED
|
|
#ifdef DEBUG_METHODS_ENABLED
|
|
|
|
+ if (!rettype.empty())
|
|
|
|
+ bind->set_return_type(rettype);
|
|
type->method_order.push_back(p_name);
|
|
type->method_order.push_back(p_name);
|
|
#endif
|
|
#endif
|
|
|
|
|