[][src]Macro gdnative_common::godot_gdnative_init

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

Declare the API endpoint to initialize the gdnative API on startup.

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

This example is not tested
// Declares an extern function named custom_gdnative_init instead of
// godot_gdnative_init.
godot_gdnative_init!(my_init_callback as custom_gdnative_init);

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