Browse Source

Merge pull request #277 from RameshRavone/patch-2

Fix #272
Thomas Herzog 6 years ago
parent
commit
e4fb5ca2a5
2 changed files with 4 additions and 2 deletions
  1. 2 2
      include/core/Godot.hpp
  2. 2 0
      src/core/GodotGlobal.cpp

+ 2 - 2
include/core/Godot.hpp

@@ -45,8 +45,8 @@ public:
 		Name *instance = godot::as<Name>(script->new_());                                                                                           \
 		Name *instance = godot::as<Name>(script->new_());                                                                                           \
 		return instance;                                                                                                                            \
 		return instance;                                                                                                                            \
 	}                                                                                                                                               \
 	}                                                                                                                                               \
-	inline static size_t ___get_id() { return typeid(Name).hash_code(); };                                                                          \
-	inline static size_t ___get_base_id() { return typeid(Base).hash_code(); };                                                                     \
+	inline static size_t ___get_id() { return typeid(Name).hash_code(); }                                                                          \
+	inline static size_t ___get_base_id() { return typeid(Base).hash_code(); }                                                                     \
 	inline static const char *___get_base_type_name() { return Base::___get_class_name(); }                                                         \
 	inline static const char *___get_base_type_name() { return Base::___get_class_name(); }                                                         \
 	inline static Object *___get_from_variant(godot::Variant a) { return (godot::Object *)godot::as<Name>(godot::Object::___get_from_variant(a)); } \
 	inline static Object *___get_from_variant(godot::Variant a) { return (godot::Object *)godot::as<Name>(godot::Object::___get_from_variant(a)); } \
                                                                                                                                                     \
                                                                                                                                                     \

+ 2 - 0
src/core/GodotGlobal.cpp

@@ -67,6 +67,7 @@ void Godot::print_error(const String &description, const String &function, const
 }
 }
 
 
 void ___register_types();
 void ___register_types();
+void ___init_method_bindings();
 
 
 void Godot::gdnative_init(godot_gdnative_init_options *options) {
 void Godot::gdnative_init(godot_gdnative_init_options *options) {
 	godot::api = options->api_struct;
 	godot::api = options->api_struct;
@@ -111,6 +112,7 @@ void Godot::nativescript_init(void *handle) {
 	godot::_RegisterState::language_index = godot::nativescript_1_1_api->godot_nativescript_register_instance_binding_data_functions(binding_funcs);
 	godot::_RegisterState::language_index = godot::nativescript_1_1_api->godot_nativescript_register_instance_binding_data_functions(binding_funcs);
 
 
 	___register_types();
 	___register_types();
+	___init_method_bindings();
 }
 }
 
 
 void Godot::nativescript_terminate(void *handle) {
 void Godot::nativescript_terminate(void *handle) {