//! Manually Generated DittoFFI Bindings
//!
//! These must be updated when dittoffi changes
#![allow(improper_ctypes_definitions)] // See issue https://github.com/getditto/safer_ffi/issues/31
#![warn(rust_2018_idioms)]
#![allow(clippy::all)]
#![warn(clippy::correctness)]
#![cfg_attr(not(test), warn(clippy::perf))]
#![deny(unsafe_op_in_unsafe_fn)]
#![recursion_limit = "256"]
#![cfg_attr(
    doc,
    warn(
        rustdoc::bare_urls,
        rustdoc::broken_intra_doc_links,
        rustdoc::invalid_codeblock_attributes,
        rustdoc::invalid_rust_codeblocks,
        rustdoc::missing_crate_level_docs,
    )
)]
#![allow(clippy::disallowed_macros)]

#[macro_use]
extern crate macro_rules_attribute;

#[rustfmt::skip]
use {
    ::std::{
        fmt,
        os::raw::{c_double, c_int, c_uint, c_ulonglong, c_void},
    },
    self::ffi_utils::{
        c_slice, char_p, extern_type_polyfill, repr_c as c,
        FfiDropBox, NonOpaque, Out,
    }
};

pub mod ffi_utils;

pub use dittoffi::*;
mod dittoffi;

#[cfg(test)]
mod test {
    use super::*;

    /// Minimal test to force cargo/rustc to attempt to link to
    /// libdittoffi
    // This should not use ditto_test as it is public
    #[test]
    fn test_linking() {
        ditto_logger_init();
    }
}
