Define the {de,}initialization functions in the bindings

The extension creators then don't need to create those just to redirect
to the bindings.
pull/602/head
George Marques 2021-08-19 20:18:21 -03:00 committed by Bastiaan Olij
parent a0634cca3f
commit 5615c92173
2 changed files with 11 additions and 8 deletions

View File

@ -80,3 +80,14 @@ void GDExtensionBinding::free_instance_callback(void *p_token, void *p_instance,
} }
} // namespace godot } // namespace godot
extern "C" {
void GDN_EXPORT initialize_level(void *userdata, GDNativeInitializationLevel p_level) {
godot::GDExtensionBinding::initialize_level(userdata, p_level);
}
void GDN_EXPORT deinitialize_level(void *userdata, GDNativeInitializationLevel p_level) {
godot::GDExtensionBinding::deinitialize_level(userdata, p_level);
}
}

View File

@ -29,12 +29,4 @@ GDNativeBool GDN_EXPORT example_library_init(const GDNativeInterface *p_interfac
return result; return result;
} }
void GDN_EXPORT initialize_level(void *userdata, GDNativeInitializationLevel p_level) {
godot::GDExtensionBinding::initialize_level(userdata, p_level);
}
void GDN_EXPORT deinitialize_level(void *userdata, GDNativeInitializationLevel p_level) {
godot::GDExtensionBinding::deinitialize_level(userdata, p_level);
}
} }