[][src]Macro gdnative_common::godot_nativescript_init

macro_rules! godot_nativescript_init {
    (  ) => { ... };
    (
$ callback : ident ) => { ... };
    (
_ as $ fn_name : ident ) => { ... };
    ( $ callback : ident as $ fn_name : ident ) => { ... };
}

Declare the API endpoint to initialize nativescript classes on startup.

By default this declares an extern function named godot_nativescript_init. This can be overridden, for example:

This example is not tested
// Declares an extern function named custom_nativescript_init instead of
// godot_nativescript_init.
godot_gdnative_terminate!(my_registration_callback as custom_nativescript_init);

Overriding the default entry point names can be useful if several gdnative libraries are linked statically to avoid name clashes.