flint-sys 0.9.0

Bindings to the FLINT C library
Documentation
/* automatically generated by rust-bindgen 0.70.1 */

use crate::deps::*;
use crate::flint::*;


pub const GR_SUCCESS: u32 = 0;
pub const GR_DOMAIN: u32 = 1;
pub const GR_UNABLE: u32 = 2;
pub const GR_TEST_FAIL: u32 = 4;
pub const truth_t_T_TRUE: truth_t = 0;
pub const truth_t_T_FALSE: truth_t = 1;
pub const truth_t_T_UNKNOWN: truth_t = 2;
pub type truth_t = libc::c_uint;
#[repr(C)]
pub struct gr_stream_struct {
    pub fp: *mut FLINT_FILE,
    pub s: *mut libc::c_char,
    pub len: slong,
    pub alloc: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_stream_struct"][::std::mem::size_of::<gr_stream_struct>() - 32usize];
    ["Alignment of gr_stream_struct"][::std::mem::align_of::<gr_stream_struct>() - 8usize];
    ["Offset of field: gr_stream_struct::fp"]
        [::std::mem::offset_of!(gr_stream_struct, fp) - 0usize];
    ["Offset of field: gr_stream_struct::s"][::std::mem::offset_of!(gr_stream_struct, s) - 8usize];
    ["Offset of field: gr_stream_struct::len"]
        [::std::mem::offset_of!(gr_stream_struct, len) - 16usize];
    ["Offset of field: gr_stream_struct::alloc"]
        [::std::mem::offset_of!(gr_stream_struct, alloc) - 24usize];
};
impl Default for gr_stream_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_stream_t = [gr_stream_struct; 1usize];
pub type gr_funcptr = ::std::option::Option<unsafe extern "C" fn() -> libc::c_int>;
#[repr(C)]
pub struct gr_ctx_struct {
    pub data: [libc::c_char; 48usize],
    pub which_ring: ulong,
    pub sizeof_elem: slong,
    pub methods: *mut gr_funcptr,
    pub size_limit: ulong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_ctx_struct"][::std::mem::size_of::<gr_ctx_struct>() - 80usize];
    ["Alignment of gr_ctx_struct"][::std::mem::align_of::<gr_ctx_struct>() - 8usize];
    ["Offset of field: gr_ctx_struct::data"][::std::mem::offset_of!(gr_ctx_struct, data) - 0usize];
    ["Offset of field: gr_ctx_struct::which_ring"]
        [::std::mem::offset_of!(gr_ctx_struct, which_ring) - 48usize];
    ["Offset of field: gr_ctx_struct::sizeof_elem"]
        [::std::mem::offset_of!(gr_ctx_struct, sizeof_elem) - 56usize];
    ["Offset of field: gr_ctx_struct::methods"]
        [::std::mem::offset_of!(gr_ctx_struct, methods) - 64usize];
    ["Offset of field: gr_ctx_struct::size_limit"]
        [::std::mem::offset_of!(gr_ctx_struct, size_limit) - 72usize];
};
impl Default for gr_ctx_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_ctx_t = [gr_ctx_struct; 1usize];
pub type gr_ptr = *mut libc::c_void;
pub type gr_srcptr = *const libc::c_void;
pub type gr_ctx_ptr = *mut libc::c_void;
#[repr(C)]
pub struct gr_vec_struct {
    pub entries: gr_ptr,
    pub alloc: slong,
    pub length: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_vec_struct"][::std::mem::size_of::<gr_vec_struct>() - 24usize];
    ["Alignment of gr_vec_struct"][::std::mem::align_of::<gr_vec_struct>() - 8usize];
    ["Offset of field: gr_vec_struct::entries"]
        [::std::mem::offset_of!(gr_vec_struct, entries) - 0usize];
    ["Offset of field: gr_vec_struct::alloc"]
        [::std::mem::offset_of!(gr_vec_struct, alloc) - 8usize];
    ["Offset of field: gr_vec_struct::length"]
        [::std::mem::offset_of!(gr_vec_struct, length) - 16usize];
};
impl Default for gr_vec_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_vec_t = [gr_vec_struct; 1usize];
#[repr(C)]
pub struct gr_mat_struct {
    pub entries: gr_ptr,
    pub r: slong,
    pub c: slong,
    pub stride: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_mat_struct"][::std::mem::size_of::<gr_mat_struct>() - 32usize];
    ["Alignment of gr_mat_struct"][::std::mem::align_of::<gr_mat_struct>() - 8usize];
    ["Offset of field: gr_mat_struct::entries"]
        [::std::mem::offset_of!(gr_mat_struct, entries) - 0usize];
    ["Offset of field: gr_mat_struct::r"][::std::mem::offset_of!(gr_mat_struct, r) - 8usize];
    ["Offset of field: gr_mat_struct::c"][::std::mem::offset_of!(gr_mat_struct, c) - 16usize];
    ["Offset of field: gr_mat_struct::stride"]
        [::std::mem::offset_of!(gr_mat_struct, stride) - 24usize];
};
impl Default for gr_mat_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_mat_t = [gr_mat_struct; 1usize];
#[repr(C)]
pub struct gr_poly_struct {
    pub coeffs: gr_ptr,
    pub alloc: slong,
    pub length: slong,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of gr_poly_struct"][::std::mem::size_of::<gr_poly_struct>() - 24usize];
    ["Alignment of gr_poly_struct"][::std::mem::align_of::<gr_poly_struct>() - 8usize];
    ["Offset of field: gr_poly_struct::coeffs"]
        [::std::mem::offset_of!(gr_poly_struct, coeffs) - 0usize];
    ["Offset of field: gr_poly_struct::alloc"]
        [::std::mem::offset_of!(gr_poly_struct, alloc) - 8usize];
    ["Offset of field: gr_poly_struct::length"]
        [::std::mem::offset_of!(gr_poly_struct, length) - 16usize];
};
impl Default for gr_poly_struct {
    fn default() -> Self {
        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
        unsafe {
            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
            s.assume_init()
        }
    }
}
pub type gr_poly_t = [gr_poly_struct; 1usize];