Skip to main content

flint_sys/
gr_types.rs

1/* automatically generated by rust-bindgen 0.70.1 */
2
3use crate::deps::*;
4use crate::flint::*;
5
6
7pub const GR_SUCCESS: u32 = 0;
8pub const GR_DOMAIN: u32 = 1;
9pub const GR_UNABLE: u32 = 2;
10pub const GR_TEST_FAIL: u32 = 4;
11pub const truth_t_T_TRUE: truth_t = 0;
12pub const truth_t_T_FALSE: truth_t = 1;
13pub const truth_t_T_UNKNOWN: truth_t = 2;
14pub type truth_t = libc::c_uint;
15#[repr(C)]
16pub struct gr_stream_struct {
17    pub fp: *mut FLINT_FILE,
18    pub s: *mut libc::c_char,
19    pub len: slong,
20    pub alloc: slong,
21}
22#[allow(clippy::unnecessary_operation, clippy::identity_op)]
23const _: () = {
24    ["Size of gr_stream_struct"][::std::mem::size_of::<gr_stream_struct>() - 32usize];
25    ["Alignment of gr_stream_struct"][::std::mem::align_of::<gr_stream_struct>() - 8usize];
26    ["Offset of field: gr_stream_struct::fp"]
27        [::std::mem::offset_of!(gr_stream_struct, fp) - 0usize];
28    ["Offset of field: gr_stream_struct::s"][::std::mem::offset_of!(gr_stream_struct, s) - 8usize];
29    ["Offset of field: gr_stream_struct::len"]
30        [::std::mem::offset_of!(gr_stream_struct, len) - 16usize];
31    ["Offset of field: gr_stream_struct::alloc"]
32        [::std::mem::offset_of!(gr_stream_struct, alloc) - 24usize];
33};
34impl Default for gr_stream_struct {
35    fn default() -> Self {
36        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
37        unsafe {
38            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
39            s.assume_init()
40        }
41    }
42}
43pub type gr_stream_t = [gr_stream_struct; 1usize];
44pub type gr_funcptr = ::std::option::Option<unsafe extern "C" fn() -> libc::c_int>;
45#[repr(C)]
46pub struct gr_ctx_struct {
47    pub data: [libc::c_char; 48usize],
48    pub which_ring: ulong,
49    pub sizeof_elem: slong,
50    pub methods: *mut gr_funcptr,
51    pub size_limit: ulong,
52}
53#[allow(clippy::unnecessary_operation, clippy::identity_op)]
54const _: () = {
55    ["Size of gr_ctx_struct"][::std::mem::size_of::<gr_ctx_struct>() - 80usize];
56    ["Alignment of gr_ctx_struct"][::std::mem::align_of::<gr_ctx_struct>() - 8usize];
57    ["Offset of field: gr_ctx_struct::data"][::std::mem::offset_of!(gr_ctx_struct, data) - 0usize];
58    ["Offset of field: gr_ctx_struct::which_ring"]
59        [::std::mem::offset_of!(gr_ctx_struct, which_ring) - 48usize];
60    ["Offset of field: gr_ctx_struct::sizeof_elem"]
61        [::std::mem::offset_of!(gr_ctx_struct, sizeof_elem) - 56usize];
62    ["Offset of field: gr_ctx_struct::methods"]
63        [::std::mem::offset_of!(gr_ctx_struct, methods) - 64usize];
64    ["Offset of field: gr_ctx_struct::size_limit"]
65        [::std::mem::offset_of!(gr_ctx_struct, size_limit) - 72usize];
66};
67impl Default for gr_ctx_struct {
68    fn default() -> Self {
69        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
70        unsafe {
71            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
72            s.assume_init()
73        }
74    }
75}
76pub type gr_ctx_t = [gr_ctx_struct; 1usize];
77pub type gr_ptr = *mut libc::c_void;
78pub type gr_srcptr = *const libc::c_void;
79pub type gr_ctx_ptr = *mut libc::c_void;
80#[repr(C)]
81pub struct gr_vec_struct {
82    pub entries: gr_ptr,
83    pub alloc: slong,
84    pub length: slong,
85}
86#[allow(clippy::unnecessary_operation, clippy::identity_op)]
87const _: () = {
88    ["Size of gr_vec_struct"][::std::mem::size_of::<gr_vec_struct>() - 24usize];
89    ["Alignment of gr_vec_struct"][::std::mem::align_of::<gr_vec_struct>() - 8usize];
90    ["Offset of field: gr_vec_struct::entries"]
91        [::std::mem::offset_of!(gr_vec_struct, entries) - 0usize];
92    ["Offset of field: gr_vec_struct::alloc"]
93        [::std::mem::offset_of!(gr_vec_struct, alloc) - 8usize];
94    ["Offset of field: gr_vec_struct::length"]
95        [::std::mem::offset_of!(gr_vec_struct, length) - 16usize];
96};
97impl Default for gr_vec_struct {
98    fn default() -> Self {
99        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
100        unsafe {
101            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
102            s.assume_init()
103        }
104    }
105}
106pub type gr_vec_t = [gr_vec_struct; 1usize];
107#[repr(C)]
108pub struct gr_mat_struct {
109    pub entries: gr_ptr,
110    pub r: slong,
111    pub c: slong,
112    pub stride: slong,
113}
114#[allow(clippy::unnecessary_operation, clippy::identity_op)]
115const _: () = {
116    ["Size of gr_mat_struct"][::std::mem::size_of::<gr_mat_struct>() - 32usize];
117    ["Alignment of gr_mat_struct"][::std::mem::align_of::<gr_mat_struct>() - 8usize];
118    ["Offset of field: gr_mat_struct::entries"]
119        [::std::mem::offset_of!(gr_mat_struct, entries) - 0usize];
120    ["Offset of field: gr_mat_struct::r"][::std::mem::offset_of!(gr_mat_struct, r) - 8usize];
121    ["Offset of field: gr_mat_struct::c"][::std::mem::offset_of!(gr_mat_struct, c) - 16usize];
122    ["Offset of field: gr_mat_struct::stride"]
123        [::std::mem::offset_of!(gr_mat_struct, stride) - 24usize];
124};
125impl Default for gr_mat_struct {
126    fn default() -> Self {
127        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
128        unsafe {
129            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
130            s.assume_init()
131        }
132    }
133}
134pub type gr_mat_t = [gr_mat_struct; 1usize];
135#[repr(C)]
136pub struct gr_poly_struct {
137    pub coeffs: gr_ptr,
138    pub alloc: slong,
139    pub length: slong,
140}
141#[allow(clippy::unnecessary_operation, clippy::identity_op)]
142const _: () = {
143    ["Size of gr_poly_struct"][::std::mem::size_of::<gr_poly_struct>() - 24usize];
144    ["Alignment of gr_poly_struct"][::std::mem::align_of::<gr_poly_struct>() - 8usize];
145    ["Offset of field: gr_poly_struct::coeffs"]
146        [::std::mem::offset_of!(gr_poly_struct, coeffs) - 0usize];
147    ["Offset of field: gr_poly_struct::alloc"]
148        [::std::mem::offset_of!(gr_poly_struct, alloc) - 8usize];
149    ["Offset of field: gr_poly_struct::length"]
150        [::std::mem::offset_of!(gr_poly_struct, length) - 16usize];
151};
152impl Default for gr_poly_struct {
153    fn default() -> Self {
154        let mut s = ::std::mem::MaybeUninit::<Self>::uninit();
155        unsafe {
156            ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1);
157            s.assume_init()
158        }
159    }
160}
161pub type gr_poly_t = [gr_poly_struct; 1usize];