// automatically generated by rust-bindgen 0.72.1

pub const __bool_true_false_are_defined: u32 = 1;
pub const true_: u32 = 1;
pub const false_: u32 = 0;
pub struct CoolProp {
    __library: ::libloading::Library,
    pub Props1SI: unsafe extern "C" fn(
        FluidName: *const ::core::ffi::c_char,
        Output: *const ::core::ffi::c_char,
    ) -> f64,
    pub Props1SImulti: unsafe extern "C" fn(
        Outputs: *const ::core::ffi::c_char,
        backend: *mut ::core::ffi::c_char,
        FluidNames: *const ::core::ffi::c_char,
        fractions: *const f64,
        length_fractions: ::core::ffi::c_long,
        result: *mut f64,
        resdim1: *mut ::core::ffi::c_long,
    ),
    pub PropsSI: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        FluidName: *const ::core::ffi::c_char,
    ) -> f64,
    pub PropsSImulti: unsafe extern "C" fn(
        Outputs: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *mut f64,
        size_Prop1: ::core::ffi::c_long,
        Name2: *const ::core::ffi::c_char,
        Prop2: *mut f64,
        size_Prop2: ::core::ffi::c_long,
        backend: *mut ::core::ffi::c_char,
        FluidNames: *const ::core::ffi::c_char,
        fractions: *const f64,
        length_fractions: ::core::ffi::c_long,
        result: *mut f64,
        resdim1: *mut ::core::ffi::c_long,
        resdim2: *mut ::core::ffi::c_long,
    ),
    pub PhaseSI: unsafe extern "C" fn(
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        FluidName: *const ::core::ffi::c_char,
        phase: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long,
    pub get_global_param_string: unsafe extern "C" fn(
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long,
    pub get_parameter_information_string: unsafe extern "C" fn(
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long,
    pub get_fluid_param_string: unsafe extern "C" fn(
        fluid: *const ::core::ffi::c_char,
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long,
    pub get_fluid_param_string_len: unsafe extern "C" fn(
        fluid: *const ::core::ffi::c_char,
        param: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_long,
    pub set_config_string:
        unsafe extern "C" fn(key: *const ::core::ffi::c_char, val: *const ::core::ffi::c_char),
    pub set_config_double: unsafe extern "C" fn(key: *const ::core::ffi::c_char, val: f64),
    pub set_config_bool: unsafe extern "C" fn(key: *const ::core::ffi::c_char, val: bool),
    pub set_departure_functions: unsafe extern "C" fn(
        string_data: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub set_reference_stateS: unsafe extern "C" fn(
        Ref: *const ::core::ffi::c_char,
        reference_state: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int,
    pub set_reference_stateD: unsafe extern "C" fn(
        Ref: *const ::core::ffi::c_char,
        T: f64,
        rhomolar: f64,
        hmolar0: f64,
        smolar0: f64,
    ) -> ::core::ffi::c_int,
    pub propssi_: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        FluidName: *const ::core::ffi::c_char,
        output: *mut f64,
    ),
    pub F2K: unsafe extern "C" fn(T_F: f64) -> f64,
    pub K2F: unsafe extern "C" fn(T_K: f64) -> f64,
    pub get_param_index:
        unsafe extern "C" fn(param: *const ::core::ffi::c_char) -> ::core::ffi::c_long,
    pub get_input_pair_index:
        unsafe extern "C" fn(pair: *const ::core::ffi::c_char) -> ::core::ffi::c_long,
    pub redirect_stdout:
        unsafe extern "C" fn(file: *const ::core::ffi::c_char) -> ::core::ffi::c_long,
    pub get_debug_level: unsafe extern "C" fn() -> ::core::ffi::c_int,
    pub set_debug_level: unsafe extern "C" fn(level: ::core::ffi::c_int),
    pub saturation_ancillary: unsafe extern "C" fn(
        fluid_name: *const ::core::ffi::c_char,
        output: *const ::core::ffi::c_char,
        Q: ::core::ffi::c_int,
        input: *const ::core::ffi::c_char,
        value: f64,
    ) -> f64,
    pub HAPropsSI: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: f64,
    ) -> f64,
    pub cair_sat: unsafe extern "C" fn(T: f64) -> f64,
    pub hapropssi_: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: *const f64,
        output: *mut f64,
    ),
    pub HAProps: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: f64,
    ) -> f64,
    pub haprops_: unsafe extern "C" fn(
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: *const f64,
        output: *mut f64,
    ),
    pub AbstractState_factory: unsafe extern "C" fn(
        backend: *const ::core::ffi::c_char,
        fluids: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_long,
    pub AbstractState_fluid_names: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        fluids: *mut ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_free: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_set_fractions: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        fractions: *const f64,
        N: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_mole_fractions: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        fractions: *mut f64,
        maxN: ::core::ffi::c_long,
        N: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_mole_fractions_satState: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        saturated_state: *const ::core::ffi::c_char,
        fractions: *mut f64,
        maxN: ::core::ffi::c_long,
        N: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_fugacity: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_get_fugacity_coefficient: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_update: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: f64,
        value2: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_specify_phase: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        phase: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_unspecify_phase: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_keyed_output: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_first_saturation_deriv: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_first_partial_deriv: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_second_two_phase_deriv: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of1: ::core::ffi::c_long,
        Wrt1: ::core::ffi::c_long,
        Constant1: ::core::ffi::c_long,
        Wrt2: ::core::ffi::c_long,
        Constant2: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_second_partial_deriv: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of1: ::core::ffi::c_long,
        Wrt1: ::core::ffi::c_long,
        Constant1: ::core::ffi::c_long,
        Wrt2: ::core::ffi::c_long,
        Constant2: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_first_two_phase_deriv_splined: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        x_end: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_first_two_phase_deriv: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_update_and_common_out: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar: *mut f64,
        hmolar: *mut f64,
        smolar: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_update_and_1_out: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        output: ::core::ffi::c_long,
        out: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_update_and_5_out: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        outputs: *mut ::core::ffi::c_long,
        out1: *mut f64,
        out2: *mut f64,
        out3: *mut f64,
        out4: *mut f64,
        out5: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_set_binary_interaction_double: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        j: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        value: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_set_cubic_alpha_C: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        c1: f64,
        c2: f64,
        c3: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_set_fluid_parameter_double: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        value: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_build_phase_envelope: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        level: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_phase_envelope_data: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar_vap: *mut f64,
        rhomolar_liq: *mut f64,
        x: *mut f64,
        y: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_phase_envelope_data_checkedMemory: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        maxComponents: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar_vap: *mut f64,
        rhomolar_liq: *mut f64,
        x: *mut f64,
        y: *mut f64,
        actual_length: *mut ::core::ffi::c_long,
        actual_components: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_build_spinodal: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_get_spinodal_data: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        tau: *mut f64,
        delta: *mut f64,
        M1: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_all_critical_points: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar: *mut f64,
        stable: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_keyed_output_satState: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        saturated_state: *const ::core::ffi::c_char,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_backend_name: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        backend: *mut ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_fluid_param_string: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        param: *const ::core::ffi::c_char,
        return_buffer: *mut ::core::ffi::c_char,
        return_buffer_length: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub AbstractState_phase: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_int,
    pub AbstractState_saturated_liquid_keyed_output: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub AbstractState_saturated_vapor_keyed_output: unsafe extern "C" fn(
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64,
    pub add_fluids_as_JSON: unsafe extern "C" fn(
        backend: *const ::core::ffi::c_char,
        fluidstring: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ),
    pub C_is_valid_fluid_string:
        unsafe extern "C" fn(fluidName: *const ::core::ffi::c_char) -> ::core::ffi::c_int,
    pub C_extract_backend: unsafe extern "C" fn(
        fluid_string: *const ::core::ffi::c_char,
        backend: *mut ::core::ffi::c_char,
        backend_length: ::core::ffi::c_long,
        fluid: *mut ::core::ffi::c_char,
        fluid_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_int,
}
impl CoolProp {
    pub unsafe fn new<P>(path: P) -> Result<Self, ::libloading::Error>
    where
        P: AsRef<::std::ffi::OsStr>,
    {
        let library = ::libloading::Library::new(path)?;
        Self::from_library(library)
    }

    pub unsafe fn from_library<L>(library: L) -> Result<Self, ::libloading::Error>
    where
        L: Into<::libloading::Library>,
    {
        let __library = library.into();
        let Props1SI = __library.get(b"Props1SI\0").map(|sym| *sym)?;
        let Props1SImulti = __library.get(b"Props1SImulti\0").map(|sym| *sym)?;
        let PropsSI = __library.get(b"PropsSI\0").map(|sym| *sym)?;
        let PropsSImulti = __library.get(b"PropsSImulti\0").map(|sym| *sym)?;
        let PhaseSI = __library.get(b"PhaseSI\0").map(|sym| *sym)?;
        let get_global_param_string =
            __library.get(b"get_global_param_string\0").map(|sym| *sym)?;
        let get_parameter_information_string =
            __library.get(b"get_parameter_information_string\0").map(|sym| *sym)?;
        let get_fluid_param_string = __library.get(b"get_fluid_param_string\0").map(|sym| *sym)?;
        let get_fluid_param_string_len =
            __library.get(b"get_fluid_param_string_len\0").map(|sym| *sym)?;
        let set_config_string = __library.get(b"set_config_string\0").map(|sym| *sym)?;
        let set_config_double = __library.get(b"set_config_double\0").map(|sym| *sym)?;
        let set_config_bool = __library.get(b"set_config_bool\0").map(|sym| *sym)?;
        let set_departure_functions =
            __library.get(b"set_departure_functions\0").map(|sym| *sym)?;
        let set_reference_stateS = __library.get(b"set_reference_stateS\0").map(|sym| *sym)?;
        let set_reference_stateD = __library.get(b"set_reference_stateD\0").map(|sym| *sym)?;
        let propssi_ = __library.get(b"propssi_\0").map(|sym| *sym)?;
        let F2K = __library.get(b"F2K\0").map(|sym| *sym)?;
        let K2F = __library.get(b"K2F\0").map(|sym| *sym)?;
        let get_param_index = __library.get(b"get_param_index\0").map(|sym| *sym)?;
        let get_input_pair_index = __library.get(b"get_input_pair_index\0").map(|sym| *sym)?;
        let redirect_stdout = __library.get(b"redirect_stdout\0").map(|sym| *sym)?;
        let get_debug_level = __library.get(b"get_debug_level\0").map(|sym| *sym)?;
        let set_debug_level = __library.get(b"set_debug_level\0").map(|sym| *sym)?;
        let saturation_ancillary = __library.get(b"saturation_ancillary\0").map(|sym| *sym)?;
        let HAPropsSI = __library.get(b"HAPropsSI\0").map(|sym| *sym)?;
        let cair_sat = __library.get(b"cair_sat\0").map(|sym| *sym)?;
        let hapropssi_ = __library.get(b"hapropssi_\0").map(|sym| *sym)?;
        let HAProps = __library.get(b"HAProps\0").map(|sym| *sym)?;
        let haprops_ = __library.get(b"haprops_\0").map(|sym| *sym)?;
        let AbstractState_factory = __library.get(b"AbstractState_factory\0").map(|sym| *sym)?;
        let AbstractState_fluid_names =
            __library.get(b"AbstractState_fluid_names\0").map(|sym| *sym)?;
        let AbstractState_free = __library.get(b"AbstractState_free\0").map(|sym| *sym)?;
        let AbstractState_set_fractions =
            __library.get(b"AbstractState_set_fractions\0").map(|sym| *sym)?;
        let AbstractState_get_mole_fractions =
            __library.get(b"AbstractState_get_mole_fractions\0").map(|sym| *sym)?;
        let AbstractState_get_mole_fractions_satState =
            __library.get(b"AbstractState_get_mole_fractions_satState\0").map(|sym| *sym)?;
        let AbstractState_get_fugacity =
            __library.get(b"AbstractState_get_fugacity\0").map(|sym| *sym)?;
        let AbstractState_get_fugacity_coefficient =
            __library.get(b"AbstractState_get_fugacity_coefficient\0").map(|sym| *sym)?;
        let AbstractState_update = __library.get(b"AbstractState_update\0").map(|sym| *sym)?;
        let AbstractState_specify_phase =
            __library.get(b"AbstractState_specify_phase\0").map(|sym| *sym)?;
        let AbstractState_unspecify_phase =
            __library.get(b"AbstractState_unspecify_phase\0").map(|sym| *sym)?;
        let AbstractState_keyed_output =
            __library.get(b"AbstractState_keyed_output\0").map(|sym| *sym)?;
        let AbstractState_first_saturation_deriv =
            __library.get(b"AbstractState_first_saturation_deriv\0").map(|sym| *sym)?;
        let AbstractState_first_partial_deriv =
            __library.get(b"AbstractState_first_partial_deriv\0").map(|sym| *sym)?;
        let AbstractState_second_two_phase_deriv =
            __library.get(b"AbstractState_second_two_phase_deriv\0").map(|sym| *sym)?;
        let AbstractState_second_partial_deriv =
            __library.get(b"AbstractState_second_partial_deriv\0").map(|sym| *sym)?;
        let AbstractState_first_two_phase_deriv_splined =
            __library.get(b"AbstractState_first_two_phase_deriv_splined\0").map(|sym| *sym)?;
        let AbstractState_first_two_phase_deriv =
            __library.get(b"AbstractState_first_two_phase_deriv\0").map(|sym| *sym)?;
        let AbstractState_update_and_common_out =
            __library.get(b"AbstractState_update_and_common_out\0").map(|sym| *sym)?;
        let AbstractState_update_and_1_out =
            __library.get(b"AbstractState_update_and_1_out\0").map(|sym| *sym)?;
        let AbstractState_update_and_5_out =
            __library.get(b"AbstractState_update_and_5_out\0").map(|sym| *sym)?;
        let AbstractState_set_binary_interaction_double =
            __library.get(b"AbstractState_set_binary_interaction_double\0").map(|sym| *sym)?;
        let AbstractState_set_cubic_alpha_C =
            __library.get(b"AbstractState_set_cubic_alpha_C\0").map(|sym| *sym)?;
        let AbstractState_set_fluid_parameter_double =
            __library.get(b"AbstractState_set_fluid_parameter_double\0").map(|sym| *sym)?;
        let AbstractState_build_phase_envelope =
            __library.get(b"AbstractState_build_phase_envelope\0").map(|sym| *sym)?;
        let AbstractState_get_phase_envelope_data =
            __library.get(b"AbstractState_get_phase_envelope_data\0").map(|sym| *sym)?;
        let AbstractState_get_phase_envelope_data_checkedMemory = __library
            .get(b"AbstractState_get_phase_envelope_data_checkedMemory\0")
            .map(|sym| *sym)?;
        let AbstractState_build_spinodal =
            __library.get(b"AbstractState_build_spinodal\0").map(|sym| *sym)?;
        let AbstractState_get_spinodal_data =
            __library.get(b"AbstractState_get_spinodal_data\0").map(|sym| *sym)?;
        let AbstractState_all_critical_points =
            __library.get(b"AbstractState_all_critical_points\0").map(|sym| *sym)?;
        let AbstractState_keyed_output_satState =
            __library.get(b"AbstractState_keyed_output_satState\0").map(|sym| *sym)?;
        let AbstractState_backend_name =
            __library.get(b"AbstractState_backend_name\0").map(|sym| *sym)?;
        let AbstractState_fluid_param_string =
            __library.get(b"AbstractState_fluid_param_string\0").map(|sym| *sym)?;
        let AbstractState_phase = __library.get(b"AbstractState_phase\0").map(|sym| *sym)?;
        let AbstractState_saturated_liquid_keyed_output =
            __library.get(b"AbstractState_saturated_liquid_keyed_output\0").map(|sym| *sym)?;
        let AbstractState_saturated_vapor_keyed_output =
            __library.get(b"AbstractState_saturated_vapor_keyed_output\0").map(|sym| *sym)?;
        let add_fluids_as_JSON = __library.get(b"add_fluids_as_JSON\0").map(|sym| *sym)?;
        let C_is_valid_fluid_string =
            __library.get(b"C_is_valid_fluid_string\0").map(|sym| *sym)?;
        let C_extract_backend = __library.get(b"C_extract_backend\0").map(|sym| *sym)?;
        Ok(CoolProp {
            __library,
            Props1SI,
            Props1SImulti,
            PropsSI,
            PropsSImulti,
            PhaseSI,
            get_global_param_string,
            get_parameter_information_string,
            get_fluid_param_string,
            get_fluid_param_string_len,
            set_config_string,
            set_config_double,
            set_config_bool,
            set_departure_functions,
            set_reference_stateS,
            set_reference_stateD,
            propssi_,
            F2K,
            K2F,
            get_param_index,
            get_input_pair_index,
            redirect_stdout,
            get_debug_level,
            set_debug_level,
            saturation_ancillary,
            HAPropsSI,
            cair_sat,
            hapropssi_,
            HAProps,
            haprops_,
            AbstractState_factory,
            AbstractState_fluid_names,
            AbstractState_free,
            AbstractState_set_fractions,
            AbstractState_get_mole_fractions,
            AbstractState_get_mole_fractions_satState,
            AbstractState_get_fugacity,
            AbstractState_get_fugacity_coefficient,
            AbstractState_update,
            AbstractState_specify_phase,
            AbstractState_unspecify_phase,
            AbstractState_keyed_output,
            AbstractState_first_saturation_deriv,
            AbstractState_first_partial_deriv,
            AbstractState_second_two_phase_deriv,
            AbstractState_second_partial_deriv,
            AbstractState_first_two_phase_deriv_splined,
            AbstractState_first_two_phase_deriv,
            AbstractState_update_and_common_out,
            AbstractState_update_and_1_out,
            AbstractState_update_and_5_out,
            AbstractState_set_binary_interaction_double,
            AbstractState_set_cubic_alpha_C,
            AbstractState_set_fluid_parameter_double,
            AbstractState_build_phase_envelope,
            AbstractState_get_phase_envelope_data,
            AbstractState_get_phase_envelope_data_checkedMemory,
            AbstractState_build_spinodal,
            AbstractState_get_spinodal_data,
            AbstractState_all_critical_points,
            AbstractState_keyed_output_satState,
            AbstractState_backend_name,
            AbstractState_fluid_param_string,
            AbstractState_phase,
            AbstractState_saturated_liquid_keyed_output,
            AbstractState_saturated_vapor_keyed_output,
            add_fluids_as_JSON,
            C_is_valid_fluid_string,
            C_extract_backend,
        })
    }

    pub unsafe fn Props1SI(
        &self,
        FluidName: *const ::core::ffi::c_char,
        Output: *const ::core::ffi::c_char,
    ) -> f64 {
        (self.Props1SI)(FluidName, Output)
    }

    pub unsafe fn Props1SImulti(
        &self,
        Outputs: *const ::core::ffi::c_char,
        backend: *mut ::core::ffi::c_char,
        FluidNames: *const ::core::ffi::c_char,
        fractions: *const f64,
        length_fractions: ::core::ffi::c_long,
        result: *mut f64,
        resdim1: *mut ::core::ffi::c_long,
    ) {
        (self.Props1SImulti)(
            Outputs,
            backend,
            FluidNames,
            fractions,
            length_fractions,
            result,
            resdim1,
        )
    }

    pub unsafe fn PropsSI(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        FluidName: *const ::core::ffi::c_char,
    ) -> f64 {
        (self.PropsSI)(Output, Name1, Prop1, Name2, Prop2, FluidName)
    }

    pub unsafe fn PropsSImulti(
        &self,
        Outputs: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *mut f64,
        size_Prop1: ::core::ffi::c_long,
        Name2: *const ::core::ffi::c_char,
        Prop2: *mut f64,
        size_Prop2: ::core::ffi::c_long,
        backend: *mut ::core::ffi::c_char,
        FluidNames: *const ::core::ffi::c_char,
        fractions: *const f64,
        length_fractions: ::core::ffi::c_long,
        result: *mut f64,
        resdim1: *mut ::core::ffi::c_long,
        resdim2: *mut ::core::ffi::c_long,
    ) {
        (self.PropsSImulti)(
            Outputs,
            Name1,
            Prop1,
            size_Prop1,
            Name2,
            Prop2,
            size_Prop2,
            backend,
            FluidNames,
            fractions,
            length_fractions,
            result,
            resdim1,
            resdim2,
        )
    }

    pub unsafe fn PhaseSI(
        &self,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        FluidName: *const ::core::ffi::c_char,
        phase: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long {
        (self.PhaseSI)(Name1, Prop1, Name2, Prop2, FluidName, phase, n)
    }

    pub unsafe fn get_global_param_string(
        &self,
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long {
        (self.get_global_param_string)(param, Output, n)
    }

    pub unsafe fn get_parameter_information_string(
        &self,
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long {
        (self.get_parameter_information_string)(param, Output, n)
    }

    pub unsafe fn get_fluid_param_string(
        &self,
        fluid: *const ::core::ffi::c_char,
        param: *const ::core::ffi::c_char,
        Output: *mut ::core::ffi::c_char,
        n: ::core::ffi::c_int,
    ) -> ::core::ffi::c_long {
        (self.get_fluid_param_string)(fluid, param, Output, n)
    }

    pub unsafe fn get_fluid_param_string_len(
        &self,
        fluid: *const ::core::ffi::c_char,
        param: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_long {
        (self.get_fluid_param_string_len)(fluid, param)
    }

    pub unsafe fn set_config_string(
        &self,
        key: *const ::core::ffi::c_char,
        val: *const ::core::ffi::c_char,
    ) {
        (self.set_config_string)(key, val)
    }

    pub unsafe fn set_config_double(&self, key: *const ::core::ffi::c_char, val: f64) {
        (self.set_config_double)(key, val)
    }

    pub unsafe fn set_config_bool(&self, key: *const ::core::ffi::c_char, val: bool) {
        (self.set_config_bool)(key, val)
    }

    pub unsafe fn set_departure_functions(
        &self,
        string_data: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.set_departure_functions)(string_data, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn set_reference_stateS(
        &self,
        Ref: *const ::core::ffi::c_char,
        reference_state: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int {
        (self.set_reference_stateS)(Ref, reference_state)
    }

    pub unsafe fn set_reference_stateD(
        &self,
        Ref: *const ::core::ffi::c_char,
        T: f64,
        rhomolar: f64,
        hmolar0: f64,
        smolar0: f64,
    ) -> ::core::ffi::c_int {
        (self.set_reference_stateD)(Ref, T, rhomolar, hmolar0, smolar0)
    }

    pub unsafe fn propssi_(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        FluidName: *const ::core::ffi::c_char,
        output: *mut f64,
    ) {
        (self.propssi_)(Output, Name1, Prop1, Name2, Prop2, FluidName, output)
    }

    pub unsafe fn F2K(&self, T_F: f64) -> f64 {
        (self.F2K)(T_F)
    }

    pub unsafe fn K2F(&self, T_K: f64) -> f64 {
        (self.K2F)(T_K)
    }

    pub unsafe fn get_param_index(&self, param: *const ::core::ffi::c_char) -> ::core::ffi::c_long {
        (self.get_param_index)(param)
    }

    pub unsafe fn get_input_pair_index(
        &self,
        pair: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_long {
        (self.get_input_pair_index)(pair)
    }

    pub unsafe fn redirect_stdout(&self, file: *const ::core::ffi::c_char) -> ::core::ffi::c_long {
        (self.redirect_stdout)(file)
    }

    pub unsafe fn get_debug_level(&self) -> ::core::ffi::c_int {
        (self.get_debug_level)()
    }

    pub unsafe fn set_debug_level(&self, level: ::core::ffi::c_int) {
        (self.set_debug_level)(level)
    }

    pub unsafe fn saturation_ancillary(
        &self,
        fluid_name: *const ::core::ffi::c_char,
        output: *const ::core::ffi::c_char,
        Q: ::core::ffi::c_int,
        input: *const ::core::ffi::c_char,
        value: f64,
    ) -> f64 {
        (self.saturation_ancillary)(fluid_name, output, Q, input, value)
    }

    pub unsafe fn HAPropsSI(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: f64,
    ) -> f64 {
        (self.HAPropsSI)(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3)
    }

    pub unsafe fn cair_sat(&self, T: f64) -> f64 {
        (self.cair_sat)(T)
    }

    pub unsafe fn hapropssi_(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: *const f64,
        output: *mut f64,
    ) {
        (self.hapropssi_)(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3, output)
    }

    pub unsafe fn HAProps(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: f64,
    ) -> f64 {
        (self.HAProps)(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3)
    }

    pub unsafe fn haprops_(
        &self,
        Output: *const ::core::ffi::c_char,
        Name1: *const ::core::ffi::c_char,
        Prop1: *const f64,
        Name2: *const ::core::ffi::c_char,
        Prop2: *const f64,
        Name3: *const ::core::ffi::c_char,
        Prop3: *const f64,
        output: *mut f64,
    ) {
        (self.haprops_)(Output, Name1, Prop1, Name2, Prop2, Name3, Prop3, output)
    }

    pub unsafe fn AbstractState_factory(
        &self,
        backend: *const ::core::ffi::c_char,
        fluids: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_long {
        (self.AbstractState_factory)(backend, fluids, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_fluid_names(
        &self,
        handle: ::core::ffi::c_long,
        fluids: *mut ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_fluid_names)(handle, fluids, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_free(
        &self,
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_free)(handle, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_set_fractions(
        &self,
        handle: ::core::ffi::c_long,
        fractions: *const f64,
        N: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_set_fractions)(
            handle,
            fractions,
            N,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_get_mole_fractions(
        &self,
        handle: ::core::ffi::c_long,
        fractions: *mut f64,
        maxN: ::core::ffi::c_long,
        N: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_get_mole_fractions)(
            handle,
            fractions,
            maxN,
            N,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_get_mole_fractions_satState(
        &self,
        handle: ::core::ffi::c_long,
        saturated_state: *const ::core::ffi::c_char,
        fractions: *mut f64,
        maxN: ::core::ffi::c_long,
        N: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_get_mole_fractions_satState)(
            handle,
            saturated_state,
            fractions,
            maxN,
            N,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_get_fugacity(
        &self,
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_get_fugacity)(handle, i, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_get_fugacity_coefficient(
        &self,
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_get_fugacity_coefficient)(
            handle,
            i,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_update(
        &self,
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: f64,
        value2: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_update)(
            handle,
            input_pair,
            value1,
            value2,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_specify_phase(
        &self,
        handle: ::core::ffi::c_long,
        phase: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_specify_phase)(handle, phase, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_unspecify_phase(
        &self,
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_unspecify_phase)(handle, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_keyed_output(
        &self,
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_keyed_output)(handle, param, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_first_saturation_deriv(
        &self,
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_first_saturation_deriv)(
            handle,
            Of,
            Wrt,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_first_partial_deriv(
        &self,
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_first_partial_deriv)(
            handle,
            Of,
            Wrt,
            Constant,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_second_two_phase_deriv(
        &self,
        handle: ::core::ffi::c_long,
        Of1: ::core::ffi::c_long,
        Wrt1: ::core::ffi::c_long,
        Constant1: ::core::ffi::c_long,
        Wrt2: ::core::ffi::c_long,
        Constant2: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_second_two_phase_deriv)(
            handle,
            Of1,
            Wrt1,
            Constant1,
            Wrt2,
            Constant2,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_second_partial_deriv(
        &self,
        handle: ::core::ffi::c_long,
        Of1: ::core::ffi::c_long,
        Wrt1: ::core::ffi::c_long,
        Constant1: ::core::ffi::c_long,
        Wrt2: ::core::ffi::c_long,
        Constant2: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_second_partial_deriv)(
            handle,
            Of1,
            Wrt1,
            Constant1,
            Wrt2,
            Constant2,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_first_two_phase_deriv_splined(
        &self,
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        x_end: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_first_two_phase_deriv_splined)(
            handle,
            Of,
            Wrt,
            Constant,
            x_end,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_first_two_phase_deriv(
        &self,
        handle: ::core::ffi::c_long,
        Of: ::core::ffi::c_long,
        Wrt: ::core::ffi::c_long,
        Constant: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_first_two_phase_deriv)(
            handle,
            Of,
            Wrt,
            Constant,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_update_and_common_out(
        &self,
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar: *mut f64,
        hmolar: *mut f64,
        smolar: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_update_and_common_out)(
            handle,
            input_pair,
            value1,
            value2,
            length,
            T,
            p,
            rhomolar,
            hmolar,
            smolar,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_update_and_1_out(
        &self,
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        output: ::core::ffi::c_long,
        out: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_update_and_1_out)(
            handle,
            input_pair,
            value1,
            value2,
            length,
            output,
            out,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_update_and_5_out(
        &self,
        handle: ::core::ffi::c_long,
        input_pair: ::core::ffi::c_long,
        value1: *const f64,
        value2: *const f64,
        length: ::core::ffi::c_long,
        outputs: *mut ::core::ffi::c_long,
        out1: *mut f64,
        out2: *mut f64,
        out3: *mut f64,
        out4: *mut f64,
        out5: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_update_and_5_out)(
            handle,
            input_pair,
            value1,
            value2,
            length,
            outputs,
            out1,
            out2,
            out3,
            out4,
            out5,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_set_binary_interaction_double(
        &self,
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        j: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        value: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_set_binary_interaction_double)(
            handle,
            i,
            j,
            parameter,
            value,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_set_cubic_alpha_C(
        &self,
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        c1: f64,
        c2: f64,
        c3: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_set_cubic_alpha_C)(
            handle,
            i,
            parameter,
            c1,
            c2,
            c3,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_set_fluid_parameter_double(
        &self,
        handle: ::core::ffi::c_long,
        i: ::core::ffi::c_long,
        parameter: *const ::core::ffi::c_char,
        value: f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_set_fluid_parameter_double)(
            handle,
            i,
            parameter,
            value,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_build_phase_envelope(
        &self,
        handle: ::core::ffi::c_long,
        level: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_build_phase_envelope)(
            handle,
            level,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_get_phase_envelope_data(
        &self,
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar_vap: *mut f64,
        rhomolar_liq: *mut f64,
        x: *mut f64,
        y: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_get_phase_envelope_data)(
            handle,
            length,
            T,
            p,
            rhomolar_vap,
            rhomolar_liq,
            x,
            y,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_get_phase_envelope_data_checkedMemory(
        &self,
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        maxComponents: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar_vap: *mut f64,
        rhomolar_liq: *mut f64,
        x: *mut f64,
        y: *mut f64,
        actual_length: *mut ::core::ffi::c_long,
        actual_components: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_get_phase_envelope_data_checkedMemory)(
            handle,
            length,
            maxComponents,
            T,
            p,
            rhomolar_vap,
            rhomolar_liq,
            x,
            y,
            actual_length,
            actual_components,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_build_spinodal(
        &self,
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_build_spinodal)(handle, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_get_spinodal_data(
        &self,
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        tau: *mut f64,
        delta: *mut f64,
        M1: *mut f64,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_get_spinodal_data)(
            handle,
            length,
            tau,
            delta,
            M1,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_all_critical_points(
        &self,
        handle: ::core::ffi::c_long,
        length: ::core::ffi::c_long,
        T: *mut f64,
        p: *mut f64,
        rhomolar: *mut f64,
        stable: *mut ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_all_critical_points)(
            handle,
            length,
            T,
            p,
            rhomolar,
            stable,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_keyed_output_satState(
        &self,
        handle: ::core::ffi::c_long,
        saturated_state: *const ::core::ffi::c_char,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_keyed_output_satState)(
            handle,
            saturated_state,
            param,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_backend_name(
        &self,
        handle: ::core::ffi::c_long,
        backend: *mut ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_backend_name)(handle, backend, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_fluid_param_string(
        &self,
        handle: ::core::ffi::c_long,
        param: *const ::core::ffi::c_char,
        return_buffer: *mut ::core::ffi::c_char,
        return_buffer_length: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.AbstractState_fluid_param_string)(
            handle,
            param,
            return_buffer,
            return_buffer_length,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_phase(
        &self,
        handle: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_int {
        (self.AbstractState_phase)(handle, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn AbstractState_saturated_liquid_keyed_output(
        &self,
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_saturated_liquid_keyed_output)(
            handle,
            param,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn AbstractState_saturated_vapor_keyed_output(
        &self,
        handle: ::core::ffi::c_long,
        param: ::core::ffi::c_long,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) -> f64 {
        (self.AbstractState_saturated_vapor_keyed_output)(
            handle,
            param,
            errcode,
            message_buffer,
            buffer_length,
        )
    }

    pub unsafe fn add_fluids_as_JSON(
        &self,
        backend: *const ::core::ffi::c_char,
        fluidstring: *const ::core::ffi::c_char,
        errcode: *mut ::core::ffi::c_long,
        message_buffer: *mut ::core::ffi::c_char,
        buffer_length: ::core::ffi::c_long,
    ) {
        (self.add_fluids_as_JSON)(backend, fluidstring, errcode, message_buffer, buffer_length)
    }

    pub unsafe fn C_is_valid_fluid_string(
        &self,
        fluidName: *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int {
        (self.C_is_valid_fluid_string)(fluidName)
    }

    pub unsafe fn C_extract_backend(
        &self,
        fluid_string: *const ::core::ffi::c_char,
        backend: *mut ::core::ffi::c_char,
        backend_length: ::core::ffi::c_long,
        fluid: *mut ::core::ffi::c_char,
        fluid_length: ::core::ffi::c_long,
    ) -> ::core::ffi::c_int {
        (self.C_extract_backend)(fluid_string, backend, backend_length, fluid, fluid_length)
    }
}
