---
source: crates/aviutl2-macros/src/module_functions.rs
expression: format_tokens(output)
---
impl MyModule {
    fn my_function(&self) {}
}
::aviutl2::__internal_module! {
    impl ::aviutl2::module::ScriptModuleFunctions for MyModule {
        fn functions() -> Vec<::aviutl2::module::ModuleFunction> {
            let mut functions = Vec::new();
            functions.push(::aviutl2::module::ModuleFunction {
                name: "my_function".to_string(),
                func: bridge_my_function,
            });
            return functions;
            extern "C" fn bridge_my_function(
                smp: *mut ::aviutl2::sys::module2::SCRIPT_MODULE_PARAM,
            ) {
                let mut params =
                    unsafe { ::aviutl2::module::ScriptModuleCallHandle::from_raw(smp) };
                <MyModule as ::aviutl2::module::ScriptModule>::with_instance(|__internal_self| {
                    let () = <MyModule>::my_function(__internal_self, &mut params);
                });
            }
        }
    }
}
