pub fn new(code: &str) -> Option<Self> {
        let mut p_compiled = std::mem::MaybeUninit::uninit();
        let mut p_compiled_size = std::mem::MaybeUninit::uninit();
        unsafe {
            let code = std::ffi::CString::new(code).unwrap();
            if sys::gauge_calculator_code_precompile(
                p_compiled.as_mut_ptr(),
                p_compiled_size.as_mut_ptr(),
                code.as_ptr(),
            ) != 0
            {
                Some(CompiledCalculatorCode {
                    p_compiled: p_compiled.assume_init(),
                    _p_compiled_size: p_compiled_size.assume_init(),
                })
            } else {
                None
            }
        }
    }
/// Create a new CompiledCalculatorCode instance.
Create a new CompiledCalculatorCode instance.
Create a new CompiledCalculatorCode instance .
pub fn new(code: &str) -> Option<Self> {
        let mut p_compiled = std::mem::MaybeUninit::uninit();
        let mut p_compiled_size = std::mem::MaybeUninit::uninit();
        unsafe {
            let code = std::ffi::CString::new(code).unwrap();
            if sys::gauge_calculator_code_precompile(
                p_compiled.as_mut_ptr(),
                p_compiled_size.as_mut_ptr(),
                code.as_ptr(),
            ) != 0
            {
                Some(CompiledCalculatorCode {
                    p_compiled: p_compiled.assume_init(),
                    _p_compiled_size: p_compiled_size.assume_init(),
                })
            } else {
                None
            }
        }
    }
pub fn new ( code : & str ) -> Option < Self > { let mut p_compiled = std :: mem :: MaybeUninit :: uninit ( ) ; let mut p_compiled_size = std :: mem :: MaybeUninit :: uninit ( ) ; unsafe { let code = std :: ffi :: CString :: new ( code ) . unwrap ( ) ; if sys :: gauge_calculator_code_precompile ( p_compiled . as_mut_ptr ( ) , p_compiled_size . as_mut_ptr ( ) , code . as_ptr ( ) , ) != 0 { Some ( CompiledCalculatorCode { p_compiled : p_compiled . assume_init ( ) , _p_compiled_size : p_compiled_size . assume_init ( ) , } ) } else { None } } }
Create a new CompiledCalculatorCode instance.
Create a new CompiledCalculatorCode instance .
code
&str