/* automatically generated by rust-bindgen 0.69.2 */

pub type uchar = ::core::ffi::c_uchar;
pub type int32 = i32;
pub type decimal_digit_t = int32;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct decimal_t {
    pub intg: ::core::ffi::c_int,
    pub frac: ::core::ffi::c_int,
    pub len: ::core::ffi::c_int,
    pub sign: bool,
    pub buf: *mut decimal_digit_t,
}
#[test]
fn bindgen_test_layout_decimal_t() {
    const UNINIT: ::core::mem::MaybeUninit<decimal_t> = ::core::mem::MaybeUninit::uninit();
    let ptr = UNINIT.as_ptr();
    assert_eq!(
        ::core::mem::size_of::<decimal_t>(),
        24usize,
        concat!("Size of: ", stringify!(decimal_t))
    );
    assert_eq!(
        ::core::mem::align_of::<decimal_t>(),
        8usize,
        concat!("Alignment of ", stringify!(decimal_t))
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).intg) as usize - ptr as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(decimal_t),
            "::",
            stringify!(intg)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).frac) as usize - ptr as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(decimal_t),
            "::",
            stringify!(frac)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).len) as usize - ptr as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(decimal_t),
            "::",
            stringify!(len)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).sign) as usize - ptr as usize },
        12usize,
        concat!(
            "Offset of field: ",
            stringify!(decimal_t),
            "::",
            stringify!(sign)
        )
    );
    assert_eq!(
        unsafe { ::core::ptr::addr_of!((*ptr).buf) as usize - ptr as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(decimal_t),
            "::",
            stringify!(buf)
        )
    );
}
unsafe extern "C" {
    pub fn c_string2decimal(
        from: *const ::core::ffi::c_char,
        to: *mut decimal_t,
        end: *mut *const ::core::ffi::c_char,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn c_decimal2string(
        from: *const decimal_t,
        to: *mut ::core::ffi::c_char,
        to_len: *mut ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn c_decimal2bin(
        from: *const decimal_t,
        to: *mut uchar,
        precision: ::core::ffi::c_int,
        scale: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn c_bin2decimal(
        from: *const uchar,
        to: *mut decimal_t,
        precision: ::core::ffi::c_int,
        scale: ::core::ffi::c_int,
        keep_prec: bool,
    ) -> ::core::ffi::c_int;
}
unsafe extern "C" {
    pub fn c_decimal_bin_size(
        precision: ::core::ffi::c_int,
        scale: ::core::ffi::c_int,
    ) -> ::core::ffi::c_int;
}
