pub fn write_callback(&mut self) -> String {
        let arg_list = self.annotation.function.arguments.iter()
            .enumerate()
            .map(|(i, _)| format!("arg->_{}", i));
        let arg_list = join("", ",", arg_list);

        let return_value = if self.annotation.function.is_void() {
            ""
        } else {
            "intptr_t ret = (intptr_t)"
        };

        let final_return_value = if self.annotation.function.is_void() {
           "(intptr_t)NULL" 
        } else {
            "ret"
        };

        format!(
            include_str!("resources/callback.c.template"),
            function_name=self.annotation.function.func_name,
            callback_call_list=arg_list,
            return_value=return_value,
            final_return_value=final_return_value
        )
    }
/// Write the callback invoked by the runtime.
Write the callback invoked by the runtime.
Write the callback invoked by the runtime .
pub fn write_callback(&mut self) -> String {
        let arg_list = self.annotation.function.arguments.iter()
            .enumerate()
            .map(|(i, _)| format!("arg->_{}", i));
        let arg_list = join("", ",", arg_list);
        let return_value = if self.annotation.function.is_void() {
            ""
        } else {
            "intptr_t ret = (intptr_t)"
        };
        let final_return_value = if self.annotation.function.is_void() {
           "(intptr_t)NULL" 
        } else {
            "ret"
        };
        format!(
            include_str!("resources/callback.c.template"),
            function_name=self.annotation.function.func_name,
            callback_call_list=arg_list,
            return_value=return_value,
            final_return_value=final_return_value
        )
    }
pub fn write_callback ( & mut self ) -> String { let arg_list = self . annotation . function . arguments . iter ( ) . enumerate ( ) . map ( | ( i , _ ) | format ! ( " " i ) ) ; let arg_list = join ( " " , " " , arg_list ) ; let return_value = if self . annotation . function . is_void ( ) { " " } else { " " } ; let final_return_value = if self . annotation . function . is_void ( ) { " " } else { " " } ; format ! ( include_str ( " " ) function_name self annotation function func_name callback_call_list arg_list return_value return_value final_return_value final_return_value ) }
Write the callback invoked by the runtime.
Write the callback invoked by the runtime .
&mut self