Merge pull request #277 from RameshRavone/patch-2

Fix #272
pull/282/head
Thomas Herzog 2019-04-22 09:10:31 +02:00 committed by GitHub
commit e4fb5ca2a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -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_id() { return typeid(Name).hash_code(); } \
inline static size_t ___get_base_id() { return typeid(Base).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)); } \
\ \

View File

@ -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) {