gravity/
lib.rs

1#![allow(non_upper_case_globals,
2         non_camel_case_types,
3         non_snake_case)]
4#[repr(C)]
5#[derive(Default)]
6pub struct __IncompleteArrayField<T>(::std::marker::PhantomData<T>);
7impl<T> __IncompleteArrayField<T> {
8    #[inline]
9    pub fn new() -> Self {
10        __IncompleteArrayField(::std::marker::PhantomData)
11    }
12    #[inline]
13    pub unsafe fn as_ptr(&self) -> *const T {
14        ::std::mem::transmute(self)
15    }
16    #[inline]
17    pub unsafe fn as_mut_ptr(&mut self) -> *mut T {
18        ::std::mem::transmute(self)
19    }
20    #[inline]
21    pub unsafe fn as_slice(&self, len: usize) -> &[T] {
22        ::std::slice::from_raw_parts(self.as_ptr(), len)
23    }
24    #[inline]
25    pub unsafe fn as_mut_slice(&mut self, len: usize) -> &mut [T] {
26        ::std::slice::from_raw_parts_mut(self.as_mut_ptr(), len)
27    }
28}
29impl<T> ::std::fmt::Debug for __IncompleteArrayField<T> {
30    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
31        fmt.write_str("__IncompleteArrayField")
32    }
33}
34impl<T> ::std::clone::Clone for __IncompleteArrayField<T> {
35    #[inline]
36    fn clone(&self) -> Self {
37        Self::new()
38    }
39}
40impl<T> ::std::marker::Copy for __IncompleteArrayField<T> {}
41#[repr(C)]
42pub struct __BindgenUnionField<T>(::std::marker::PhantomData<T>);
43impl<T> __BindgenUnionField<T> {
44    #[inline]
45    pub fn new() -> Self {
46        __BindgenUnionField(::std::marker::PhantomData)
47    }
48    #[inline]
49    pub unsafe fn as_ref(&self) -> &T {
50        ::std::mem::transmute(self)
51    }
52    #[inline]
53    pub unsafe fn as_mut(&mut self) -> &mut T {
54        ::std::mem::transmute(self)
55    }
56}
57impl<T> ::std::default::Default for __BindgenUnionField<T> {
58    #[inline]
59    fn default() -> Self {
60        Self::new()
61    }
62}
63impl<T> ::std::clone::Clone for __BindgenUnionField<T> {
64    #[inline]
65    fn clone(&self) -> Self {
66        Self::new()
67    }
68}
69impl<T> ::std::marker::Copy for __BindgenUnionField<T> {}
70impl<T> ::std::fmt::Debug for __BindgenUnionField<T> {
71    fn fmt(&self, fmt: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
72        fmt.write_str("__BindgenUnionField")
73    }
74}
75pub const GRAVITY_MEMORY_DEBUG: ::std::os::raw::c_uint = 0;
76pub const INT8_MIN: ::std::os::raw::c_int = -128;
77pub const INT16_MIN: ::std::os::raw::c_int = -32768;
78pub const INT32_MIN: ::std::os::raw::c_int = -2147483648;
79pub const INT8_MAX: ::std::os::raw::c_uint = 127;
80pub const INT16_MAX: ::std::os::raw::c_uint = 32767;
81pub const INT32_MAX: ::std::os::raw::c_uint = 2147483647;
82pub const UINT8_MAX: ::std::os::raw::c_uint = 255;
83pub const UINT16_MAX: ::std::os::raw::c_uint = 65535;
84pub const UINT32_MAX: ::std::os::raw::c_uint = 4294967295;
85pub const INT_LEAST8_MIN: ::std::os::raw::c_int = -128;
86pub const INT_LEAST16_MIN: ::std::os::raw::c_int = -32768;
87pub const INT_LEAST32_MIN: ::std::os::raw::c_int = -2147483648;
88pub const INT_LEAST8_MAX: ::std::os::raw::c_uint = 127;
89pub const INT_LEAST16_MAX: ::std::os::raw::c_uint = 32767;
90pub const INT_LEAST32_MAX: ::std::os::raw::c_uint = 2147483647;
91pub const UINT_LEAST8_MAX: ::std::os::raw::c_uint = 255;
92pub const UINT_LEAST16_MAX: ::std::os::raw::c_uint = 65535;
93pub const UINT_LEAST32_MAX: ::std::os::raw::c_uint = 4294967295;
94pub const INT_FAST8_MIN: ::std::os::raw::c_int = -128;
95pub const INT_FAST16_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
96pub const INT_FAST32_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
97pub const INT_FAST8_MAX: ::std::os::raw::c_uint = 127;
98pub const INT_FAST16_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
99pub const INT_FAST32_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
100pub const UINT_FAST8_MAX: ::std::os::raw::c_uint = 255;
101pub const UINT_FAST16_MAX: ::std::os::raw::c_int = -1;
102pub const UINT_FAST32_MAX: ::std::os::raw::c_int = -1;
103pub const INTPTR_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
104pub const INTPTR_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
105pub const UINTPTR_MAX: ::std::os::raw::c_int = -1;
106pub const PTRDIFF_MIN: ::std::os::raw::c_longlong = -9223372036854775808;
107pub const PTRDIFF_MAX: ::std::os::raw::c_ulonglong = 9223372036854775807;
108pub const SIG_ATOMIC_MIN: ::std::os::raw::c_int = -2147483648;
109pub const SIG_ATOMIC_MAX: ::std::os::raw::c_uint = 2147483647;
110pub const SIZE_MAX: ::std::os::raw::c_int = -1;
111pub const WINT_MIN: ::std::os::raw::c_uint = 0;
112pub const WINT_MAX: ::std::os::raw::c_uint = 4294967295;
113pub const true_: ::std::os::raw::c_uint = 1;
114pub const false_: ::std::os::raw::c_uint = 0;
115pub const NR_OPEN: ::std::os::raw::c_uint = 1024;
116pub const NGROUPS_MAX: ::std::os::raw::c_uint = 65536;
117pub const ARG_MAX: ::std::os::raw::c_uint = 131072;
118pub const LINK_MAX: ::std::os::raw::c_uint = 127;
119pub const MAX_CANON: ::std::os::raw::c_uint = 255;
120pub const MAX_INPUT: ::std::os::raw::c_uint = 255;
121pub const NAME_MAX: ::std::os::raw::c_uint = 255;
122pub const PATH_MAX: ::std::os::raw::c_uint = 4096;
123pub const PIPE_BUF: ::std::os::raw::c_uint = 4096;
124pub const XATTR_NAME_MAX: ::std::os::raw::c_uint = 255;
125pub const XATTR_SIZE_MAX: ::std::os::raw::c_uint = 65536;
126pub const XATTR_LIST_MAX: ::std::os::raw::c_uint = 65536;
127pub const RTSIG_MAX: ::std::os::raw::c_uint = 32;
128pub const PTHREAD_KEYS_MAX: ::std::os::raw::c_uint = 1024;
129pub const PTHREAD_DESTRUCTOR_ITERATIONS: ::std::os::raw::c_uint = 4;
130pub const AIO_PRIO_DELTA_MAX: ::std::os::raw::c_uint = 20;
131pub const PTHREAD_STACK_MIN: ::std::os::raw::c_uint = 16384;
132pub const DELAYTIMER_MAX: ::std::os::raw::c_uint = 2147483647;
133pub const TTY_NAME_MAX: ::std::os::raw::c_uint = 32;
134pub const LOGIN_NAME_MAX: ::std::os::raw::c_uint = 256;
135pub const HOST_NAME_MAX: ::std::os::raw::c_uint = 64;
136pub const MQ_PRIO_MAX: ::std::os::raw::c_uint = 32768;
137pub const SEM_VALUE_MAX: ::std::os::raw::c_uint = 2147483647;
138pub const MAXNAMLEN: ::std::os::raw::c_uint = 255;
139pub const MARRAY_DEFAULT_SIZE: ::std::os::raw::c_uint = 8;
140pub const PRId8: &'static [u8; 2usize] = b"d\x00";
141pub const PRId16: &'static [u8; 2usize] = b"d\x00";
142pub const PRId32: &'static [u8; 2usize] = b"d\x00";
143pub const PRId64: &'static [u8; 3usize] = b"ld\x00";
144pub const PRIdLEAST8: &'static [u8; 2usize] = b"d\x00";
145pub const PRIdLEAST16: &'static [u8; 2usize] = b"d\x00";
146pub const PRIdLEAST32: &'static [u8; 2usize] = b"d\x00";
147pub const PRIdLEAST64: &'static [u8; 3usize] = b"ld\x00";
148pub const PRIdFAST8: &'static [u8; 2usize] = b"d\x00";
149pub const PRIdFAST16: &'static [u8; 3usize] = b"ld\x00";
150pub const PRIdFAST32: &'static [u8; 3usize] = b"ld\x00";
151pub const PRIdFAST64: &'static [u8; 3usize] = b"ld\x00";
152pub const PRIi8: &'static [u8; 2usize] = b"i\x00";
153pub const PRIi16: &'static [u8; 2usize] = b"i\x00";
154pub const PRIi32: &'static [u8; 2usize] = b"i\x00";
155pub const PRIi64: &'static [u8; 3usize] = b"li\x00";
156pub const PRIiLEAST8: &'static [u8; 2usize] = b"i\x00";
157pub const PRIiLEAST16: &'static [u8; 2usize] = b"i\x00";
158pub const PRIiLEAST32: &'static [u8; 2usize] = b"i\x00";
159pub const PRIiLEAST64: &'static [u8; 3usize] = b"li\x00";
160pub const PRIiFAST8: &'static [u8; 2usize] = b"i\x00";
161pub const PRIiFAST16: &'static [u8; 3usize] = b"li\x00";
162pub const PRIiFAST32: &'static [u8; 3usize] = b"li\x00";
163pub const PRIiFAST64: &'static [u8; 3usize] = b"li\x00";
164pub const PRIo8: &'static [u8; 2usize] = b"o\x00";
165pub const PRIo16: &'static [u8; 2usize] = b"o\x00";
166pub const PRIo32: &'static [u8; 2usize] = b"o\x00";
167pub const PRIo64: &'static [u8; 3usize] = b"lo\x00";
168pub const PRIoLEAST8: &'static [u8; 2usize] = b"o\x00";
169pub const PRIoLEAST16: &'static [u8; 2usize] = b"o\x00";
170pub const PRIoLEAST32: &'static [u8; 2usize] = b"o\x00";
171pub const PRIoLEAST64: &'static [u8; 3usize] = b"lo\x00";
172pub const PRIoFAST8: &'static [u8; 2usize] = b"o\x00";
173pub const PRIoFAST16: &'static [u8; 3usize] = b"lo\x00";
174pub const PRIoFAST32: &'static [u8; 3usize] = b"lo\x00";
175pub const PRIoFAST64: &'static [u8; 3usize] = b"lo\x00";
176pub const PRIu8: &'static [u8; 2usize] = b"u\x00";
177pub const PRIu16: &'static [u8; 2usize] = b"u\x00";
178pub const PRIu32: &'static [u8; 2usize] = b"u\x00";
179pub const PRIu64: &'static [u8; 3usize] = b"lu\x00";
180pub const PRIuLEAST8: &'static [u8; 2usize] = b"u\x00";
181pub const PRIuLEAST16: &'static [u8; 2usize] = b"u\x00";
182pub const PRIuLEAST32: &'static [u8; 2usize] = b"u\x00";
183pub const PRIuLEAST64: &'static [u8; 3usize] = b"lu\x00";
184pub const PRIuFAST8: &'static [u8; 2usize] = b"u\x00";
185pub const PRIuFAST16: &'static [u8; 3usize] = b"lu\x00";
186pub const PRIuFAST32: &'static [u8; 3usize] = b"lu\x00";
187pub const PRIuFAST64: &'static [u8; 3usize] = b"lu\x00";
188pub const PRIx8: &'static [u8; 2usize] = b"x\x00";
189pub const PRIx16: &'static [u8; 2usize] = b"x\x00";
190pub const PRIx32: &'static [u8; 2usize] = b"x\x00";
191pub const PRIx64: &'static [u8; 3usize] = b"lx\x00";
192pub const PRIxLEAST8: &'static [u8; 2usize] = b"x\x00";
193pub const PRIxLEAST16: &'static [u8; 2usize] = b"x\x00";
194pub const PRIxLEAST32: &'static [u8; 2usize] = b"x\x00";
195pub const PRIxLEAST64: &'static [u8; 3usize] = b"lx\x00";
196pub const PRIxFAST8: &'static [u8; 2usize] = b"x\x00";
197pub const PRIxFAST16: &'static [u8; 3usize] = b"lx\x00";
198pub const PRIxFAST32: &'static [u8; 3usize] = b"lx\x00";
199pub const PRIxFAST64: &'static [u8; 3usize] = b"lx\x00";
200pub const PRIX8: &'static [u8; 2usize] = b"X\x00";
201pub const PRIX16: &'static [u8; 2usize] = b"X\x00";
202pub const PRIX32: &'static [u8; 2usize] = b"X\x00";
203pub const PRIX64: &'static [u8; 3usize] = b"lX\x00";
204pub const PRIXLEAST8: &'static [u8; 2usize] = b"X\x00";
205pub const PRIXLEAST16: &'static [u8; 2usize] = b"X\x00";
206pub const PRIXLEAST32: &'static [u8; 2usize] = b"X\x00";
207pub const PRIXLEAST64: &'static [u8; 3usize] = b"lX\x00";
208pub const PRIXFAST8: &'static [u8; 2usize] = b"X\x00";
209pub const PRIXFAST16: &'static [u8; 3usize] = b"lX\x00";
210pub const PRIXFAST32: &'static [u8; 3usize] = b"lX\x00";
211pub const PRIXFAST64: &'static [u8; 3usize] = b"lX\x00";
212pub const PRIdMAX: &'static [u8; 3usize] = b"ld\x00";
213pub const PRIiMAX: &'static [u8; 3usize] = b"li\x00";
214pub const PRIoMAX: &'static [u8; 3usize] = b"lo\x00";
215pub const PRIuMAX: &'static [u8; 3usize] = b"lu\x00";
216pub const PRIxMAX: &'static [u8; 3usize] = b"lx\x00";
217pub const PRIXMAX: &'static [u8; 3usize] = b"lX\x00";
218pub const PRIdPTR: &'static [u8; 3usize] = b"ld\x00";
219pub const PRIiPTR: &'static [u8; 3usize] = b"li\x00";
220pub const PRIoPTR: &'static [u8; 3usize] = b"lo\x00";
221pub const PRIuPTR: &'static [u8; 3usize] = b"lu\x00";
222pub const PRIxPTR: &'static [u8; 3usize] = b"lx\x00";
223pub const PRIXPTR: &'static [u8; 3usize] = b"lX\x00";
224pub const SCNd8: &'static [u8; 4usize] = b"hhd\x00";
225pub const SCNd16: &'static [u8; 3usize] = b"hd\x00";
226pub const SCNd32: &'static [u8; 2usize] = b"d\x00";
227pub const SCNd64: &'static [u8; 3usize] = b"ld\x00";
228pub const SCNdLEAST8: &'static [u8; 4usize] = b"hhd\x00";
229pub const SCNdLEAST16: &'static [u8; 3usize] = b"hd\x00";
230pub const SCNdLEAST32: &'static [u8; 2usize] = b"d\x00";
231pub const SCNdLEAST64: &'static [u8; 3usize] = b"ld\x00";
232pub const SCNdFAST8: &'static [u8; 4usize] = b"hhd\x00";
233pub const SCNdFAST16: &'static [u8; 3usize] = b"ld\x00";
234pub const SCNdFAST32: &'static [u8; 3usize] = b"ld\x00";
235pub const SCNdFAST64: &'static [u8; 3usize] = b"ld\x00";
236pub const SCNi8: &'static [u8; 4usize] = b"hhi\x00";
237pub const SCNi16: &'static [u8; 3usize] = b"hi\x00";
238pub const SCNi32: &'static [u8; 2usize] = b"i\x00";
239pub const SCNi64: &'static [u8; 3usize] = b"li\x00";
240pub const SCNiLEAST8: &'static [u8; 4usize] = b"hhi\x00";
241pub const SCNiLEAST16: &'static [u8; 3usize] = b"hi\x00";
242pub const SCNiLEAST32: &'static [u8; 2usize] = b"i\x00";
243pub const SCNiLEAST64: &'static [u8; 3usize] = b"li\x00";
244pub const SCNiFAST8: &'static [u8; 4usize] = b"hhi\x00";
245pub const SCNiFAST16: &'static [u8; 3usize] = b"li\x00";
246pub const SCNiFAST32: &'static [u8; 3usize] = b"li\x00";
247pub const SCNiFAST64: &'static [u8; 3usize] = b"li\x00";
248pub const SCNu8: &'static [u8; 4usize] = b"hhu\x00";
249pub const SCNu16: &'static [u8; 3usize] = b"hu\x00";
250pub const SCNu32: &'static [u8; 2usize] = b"u\x00";
251pub const SCNu64: &'static [u8; 3usize] = b"lu\x00";
252pub const SCNuLEAST8: &'static [u8; 4usize] = b"hhu\x00";
253pub const SCNuLEAST16: &'static [u8; 3usize] = b"hu\x00";
254pub const SCNuLEAST32: &'static [u8; 2usize] = b"u\x00";
255pub const SCNuLEAST64: &'static [u8; 3usize] = b"lu\x00";
256pub const SCNuFAST8: &'static [u8; 4usize] = b"hhu\x00";
257pub const SCNuFAST16: &'static [u8; 3usize] = b"lu\x00";
258pub const SCNuFAST32: &'static [u8; 3usize] = b"lu\x00";
259pub const SCNuFAST64: &'static [u8; 3usize] = b"lu\x00";
260pub const SCNo8: &'static [u8; 4usize] = b"hho\x00";
261pub const SCNo16: &'static [u8; 3usize] = b"ho\x00";
262pub const SCNo32: &'static [u8; 2usize] = b"o\x00";
263pub const SCNo64: &'static [u8; 3usize] = b"lo\x00";
264pub const SCNoLEAST8: &'static [u8; 4usize] = b"hho\x00";
265pub const SCNoLEAST16: &'static [u8; 3usize] = b"ho\x00";
266pub const SCNoLEAST32: &'static [u8; 2usize] = b"o\x00";
267pub const SCNoLEAST64: &'static [u8; 3usize] = b"lo\x00";
268pub const SCNoFAST8: &'static [u8; 4usize] = b"hho\x00";
269pub const SCNoFAST16: &'static [u8; 3usize] = b"lo\x00";
270pub const SCNoFAST32: &'static [u8; 3usize] = b"lo\x00";
271pub const SCNoFAST64: &'static [u8; 3usize] = b"lo\x00";
272pub const SCNx8: &'static [u8; 4usize] = b"hhx\x00";
273pub const SCNx16: &'static [u8; 3usize] = b"hx\x00";
274pub const SCNx32: &'static [u8; 2usize] = b"x\x00";
275pub const SCNx64: &'static [u8; 3usize] = b"lx\x00";
276pub const SCNxLEAST8: &'static [u8; 4usize] = b"hhx\x00";
277pub const SCNxLEAST16: &'static [u8; 3usize] = b"hx\x00";
278pub const SCNxLEAST32: &'static [u8; 2usize] = b"x\x00";
279pub const SCNxLEAST64: &'static [u8; 3usize] = b"lx\x00";
280pub const SCNxFAST8: &'static [u8; 4usize] = b"hhx\x00";
281pub const SCNxFAST16: &'static [u8; 3usize] = b"lx\x00";
282pub const SCNxFAST32: &'static [u8; 3usize] = b"lx\x00";
283pub const SCNxFAST64: &'static [u8; 3usize] = b"lx\x00";
284pub const SCNdMAX: &'static [u8; 3usize] = b"ld\x00";
285pub const SCNiMAX: &'static [u8; 3usize] = b"li\x00";
286pub const SCNoMAX: &'static [u8; 3usize] = b"lo\x00";
287pub const SCNuMAX: &'static [u8; 3usize] = b"lu\x00";
288pub const SCNxMAX: &'static [u8; 3usize] = b"lx\x00";
289pub const SCNdPTR: &'static [u8; 3usize] = b"ld\x00";
290pub const SCNiPTR: &'static [u8; 3usize] = b"li\x00";
291pub const SCNoPTR: &'static [u8; 3usize] = b"lo\x00";
292pub const SCNuPTR: &'static [u8; 3usize] = b"lu\x00";
293pub const SCNxPTR: &'static [u8; 3usize] = b"lx\x00";
294pub const json_enable_comments: ::std::os::raw::c_uint = 1;
295pub const json_error_max: ::std::os::raw::c_uint = 128;
296pub const GRAVITY_VERSION: &'static [u8; 6usize] = b"0.2.6\x00";
297pub const GRAVITY_VERSION_NUMBER: ::std::os::raw::c_uint = 518;
298pub const GRAVITY_ENABLE_DOUBLE: ::std::os::raw::c_uint = 1;
299pub const GRAVITY_ENABLE_INT64: ::std::os::raw::c_uint = 1;
300pub const GRAVITY_COMPUTED_GOTO: ::std::os::raw::c_uint = 1;
301pub const GRAVITY_NULL_SILENT: ::std::os::raw::c_uint = 1;
302pub const GRAVITY_MAP_DOTSUGAR: ::std::os::raw::c_uint = 0;
303pub const MAIN_FUNCTION: &'static [u8; 5usize] = b"main\x00";
304pub const ITERATOR_INIT_FUNCTION: &'static [u8; 8usize] = b"iterate\x00";
305pub const ITERATOR_NEXT_FUNCTION: &'static [u8; 5usize] = b"next\x00";
306pub const INITMODULE_NAME: &'static [u8; 12usize] = b"$moduleinit\x00";
307pub const CLASS_INTERNAL_INIT_NAME: &'static [u8; 6usize] = b"$init\x00";
308pub const CLASS_CONSTRUCTOR_NAME: &'static [u8; 5usize] = b"init\x00";
309pub const CLASS_DESTRUCTOR_NAME: &'static [u8; 7usize] = b"deinit\x00";
310pub const SELF_PARAMETER_NAME: &'static [u8; 5usize] = b"self\x00";
311pub const OUTER_IVAR_NAME: &'static [u8; 6usize] = b"outer\x00";
312pub const GETTER_FUNCTION_NAME: &'static [u8; 4usize] = b"get\x00";
313pub const SETTER_FUNCTION_NAME: &'static [u8; 4usize] = b"set\x00";
314pub const SETTER_PARAMETER_NAME: &'static [u8; 6usize] = b"value\x00";
315pub const GLOBALS_DEFAULT_SLOT: ::std::os::raw::c_uint = 4096;
316pub const CPOOL_INDEX_MAX: ::std::os::raw::c_uint = 4096;
317pub const CPOOL_VALUE_SUPER: ::std::os::raw::c_uint = 4097;
318pub const CPOOL_VALUE_NULL: ::std::os::raw::c_uint = 4098;
319pub const CPOOL_VALUE_UNDEFINED: ::std::os::raw::c_uint = 4099;
320pub const CPOOL_VALUE_ARGUMENTS: ::std::os::raw::c_uint = 4100;
321pub const CPOOL_VALUE_TRUE: ::std::os::raw::c_uint = 4101;
322pub const CPOOL_VALUE_FALSE: ::std::os::raw::c_uint = 4102;
323pub const CPOOL_VALUE_FUNC: ::std::os::raw::c_uint = 4103;
324pub const MAX_INSTRUCTION_OPCODE: ::std::os::raw::c_uint = 64;
325pub const MAX_REGISTERS: ::std::os::raw::c_uint = 256;
326pub const MAX_LOCALS: ::std::os::raw::c_uint = 200;
327pub const MAX_UPVALUES: ::std::os::raw::c_uint = 200;
328pub const MAX_INLINE_INT: ::std::os::raw::c_uint = 131072;
329pub const MAX_FIELDSxFLUSH: ::std::os::raw::c_uint = 64;
330pub const MAX_IVARS: ::std::os::raw::c_uint = 768;
331pub const MAX_ALLOCATION: ::std::os::raw::c_uint = 4194304;
332pub const MAX_CCALLS: ::std::os::raw::c_uint = 100;
333pub const DEFAULT_CONTEXT_SIZE: ::std::os::raw::c_uint = 256;
334pub const DEFAULT_MINSTRING_SIZE: ::std::os::raw::c_uint = 32;
335pub const DEFAULT_MINSTACK_SIZE: ::std::os::raw::c_uint = 256;
336pub const DEFAULT_MINCFRAME_SIZE: ::std::os::raw::c_uint = 32;
337pub const DEFAULT_CG_THRESHOLD: ::std::os::raw::c_uint = 5242880;
338pub const DEFAULT_CG_MINTHRESHOLD: ::std::os::raw::c_uint = 1048576;
339pub const DEFAULT_CG_RATIO: f64 = 0.5;
340pub const EPSILON: f64 = 0.000001;
341pub const GRAVITY_DATA_REGISTER: ::std::os::raw::c_uint = 4294967295;
342pub const GRAVITY_FIBER_REGISTER: ::std::os::raw::c_uint = 4294967294;
343pub const GRAVITY_MSG_REGISTER: ::std::os::raw::c_uint = 4294967293;
344pub const GRAVITY_BRIDGE_INDEX: ::std::os::raw::c_uint = 65535;
345pub const GRAVITY_COMPUTED_INDEX: ::std::os::raw::c_uint = 65534;
346pub type __u_char = ::std::os::raw::c_uchar;
347pub type __u_short = ::std::os::raw::c_ushort;
348pub type __u_int = ::std::os::raw::c_uint;
349pub type __u_long = ::std::os::raw::c_ulong;
350pub type __int8_t = ::std::os::raw::c_schar;
351pub type __uint8_t = ::std::os::raw::c_uchar;
352pub type __int16_t = ::std::os::raw::c_short;
353pub type __uint16_t = ::std::os::raw::c_ushort;
354pub type __int32_t = ::std::os::raw::c_int;
355pub type __uint32_t = ::std::os::raw::c_uint;
356pub type __int64_t = ::std::os::raw::c_long;
357pub type __uint64_t = ::std::os::raw::c_ulong;
358pub type __quad_t = ::std::os::raw::c_long;
359pub type __u_quad_t = ::std::os::raw::c_ulong;
360pub type __intmax_t = ::std::os::raw::c_long;
361pub type __uintmax_t = ::std::os::raw::c_ulong;
362pub type __dev_t = ::std::os::raw::c_ulong;
363pub type __uid_t = ::std::os::raw::c_uint;
364pub type __gid_t = ::std::os::raw::c_uint;
365pub type __ino_t = ::std::os::raw::c_ulong;
366pub type __ino64_t = ::std::os::raw::c_ulong;
367pub type __mode_t = ::std::os::raw::c_uint;
368pub type __nlink_t = ::std::os::raw::c_ulong;
369pub type __off_t = ::std::os::raw::c_long;
370pub type __off64_t = ::std::os::raw::c_long;
371pub type __pid_t = ::std::os::raw::c_int;
372#[repr(C)]
373#[derive(Debug, Copy)]
374pub struct __fsid_t {
375    pub __val: [::std::os::raw::c_int; 2usize],
376}
377impl Clone for __fsid_t {
378    fn clone(&self) -> Self {
379        *self
380    }
381}
382pub type __clock_t = ::std::os::raw::c_long;
383pub type __rlim_t = ::std::os::raw::c_ulong;
384pub type __rlim64_t = ::std::os::raw::c_ulong;
385pub type __id_t = ::std::os::raw::c_uint;
386pub type __time_t = ::std::os::raw::c_long;
387pub type __useconds_t = ::std::os::raw::c_uint;
388pub type __suseconds_t = ::std::os::raw::c_long;
389pub type __daddr_t = ::std::os::raw::c_int;
390pub type __key_t = ::std::os::raw::c_int;
391pub type __clockid_t = ::std::os::raw::c_int;
392pub type __timer_t = *mut ::std::os::raw::c_void;
393pub type __blksize_t = ::std::os::raw::c_long;
394pub type __blkcnt_t = ::std::os::raw::c_long;
395pub type __blkcnt64_t = ::std::os::raw::c_long;
396pub type __fsblkcnt_t = ::std::os::raw::c_ulong;
397pub type __fsblkcnt64_t = ::std::os::raw::c_ulong;
398pub type __fsfilcnt_t = ::std::os::raw::c_ulong;
399pub type __fsfilcnt64_t = ::std::os::raw::c_ulong;
400pub type __fsword_t = ::std::os::raw::c_long;
401pub type __ssize_t = ::std::os::raw::c_long;
402pub type __syscall_slong_t = ::std::os::raw::c_long;
403pub type __syscall_ulong_t = ::std::os::raw::c_ulong;
404pub type __loff_t = __off64_t;
405pub type __qaddr_t = *mut __quad_t;
406pub type __caddr_t = *mut ::std::os::raw::c_char;
407pub type __intptr_t = ::std::os::raw::c_long;
408pub type __socklen_t = ::std::os::raw::c_uint;
409pub type int_least8_t = ::std::os::raw::c_schar;
410pub type int_least16_t = ::std::os::raw::c_short;
411pub type int_least32_t = ::std::os::raw::c_int;
412pub type int_least64_t = ::std::os::raw::c_long;
413pub type uint_least8_t = ::std::os::raw::c_uchar;
414pub type uint_least16_t = ::std::os::raw::c_ushort;
415pub type uint_least32_t = ::std::os::raw::c_uint;
416pub type uint_least64_t = ::std::os::raw::c_ulong;
417pub type int_fast8_t = ::std::os::raw::c_schar;
418pub type int_fast16_t = ::std::os::raw::c_long;
419pub type int_fast32_t = ::std::os::raw::c_long;
420pub type int_fast64_t = ::std::os::raw::c_long;
421pub type uint_fast8_t = ::std::os::raw::c_uchar;
422pub type uint_fast16_t = ::std::os::raw::c_ulong;
423pub type uint_fast32_t = ::std::os::raw::c_ulong;
424pub type uint_fast64_t = ::std::os::raw::c_ulong;
425pub type intmax_t = __intmax_t;
426pub type uintmax_t = __uintmax_t;
427#[repr(C)]
428pub struct dirent {
429    pub d_ino: __ino_t,
430    pub d_off: __off_t,
431    pub d_reclen: ::std::os::raw::c_ushort,
432    pub d_type: ::std::os::raw::c_uchar,
433    pub d_name: [::std::os::raw::c_char; 256usize],
434}
435pub const DT_UNKNOWN: _bindgen_ty_1 = _bindgen_ty_1::DT_UNKNOWN;
436pub const DT_FIFO: _bindgen_ty_1 = _bindgen_ty_1::DT_FIFO;
437pub const DT_CHR: _bindgen_ty_1 = _bindgen_ty_1::DT_CHR;
438pub const DT_DIR: _bindgen_ty_1 = _bindgen_ty_1::DT_DIR;
439pub const DT_BLK: _bindgen_ty_1 = _bindgen_ty_1::DT_BLK;
440pub const DT_REG: _bindgen_ty_1 = _bindgen_ty_1::DT_REG;
441pub const DT_LNK: _bindgen_ty_1 = _bindgen_ty_1::DT_LNK;
442pub const DT_SOCK: _bindgen_ty_1 = _bindgen_ty_1::DT_SOCK;
443pub const DT_WHT: _bindgen_ty_1 = _bindgen_ty_1::DT_WHT;
444#[repr(u32)]
445#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
446pub enum _bindgen_ty_1 {
447    DT_UNKNOWN = 0,
448    DT_FIFO = 1,
449    DT_CHR = 2,
450    DT_DIR = 4,
451    DT_BLK = 6,
452    DT_REG = 8,
453    DT_LNK = 10,
454    DT_SOCK = 12,
455    DT_WHT = 14,
456}
457#[repr(C)]
458#[derive(Debug, Copy, Clone)]
459pub struct __dirstream([u8; 0]);
460pub type DIR = __dirstream;
461pub type nanotime_t = u64;
462#[repr(C)]
463#[derive(Debug, Copy)]
464pub struct uint16_r {
465    pub n: usize,
466    pub m: usize,
467    pub p: *mut u16,
468}
469impl Clone for uint16_r {
470    fn clone(&self) -> Self {
471        *self
472    }
473}
474#[repr(C)]
475#[derive(Debug, Copy)]
476pub struct uint32_r {
477    pub n: usize,
478    pub m: usize,
479    pub p: *mut u32,
480}
481impl Clone for uint32_r {
482    fn clone(&self) -> Self {
483        *self
484    }
485}
486#[repr(C)]
487#[derive(Debug, Copy)]
488pub struct void_r {
489    pub n: usize,
490    pub m: usize,
491    pub p: *mut *mut ::std::os::raw::c_void,
492}
493impl Clone for void_r {
494    fn clone(&self) -> Self {
495        *self
496    }
497}
498#[repr(C)]
499#[derive(Debug, Copy)]
500pub struct cstring_r {
501    pub n: usize,
502    pub m: usize,
503    pub p: *mut *const ::std::os::raw::c_char,
504}
505impl Clone for cstring_r {
506    fn clone(&self) -> Self {
507        *self
508    }
509}
510#[repr(C)]
511#[derive(Debug, Copy, Clone)]
512pub struct json_t([u8; 0]);
513pub type __gwchar_t = ::std::os::raw::c_int;
514#[repr(C)]
515#[derive(Debug, Copy)]
516pub struct imaxdiv_t {
517    pub quot: ::std::os::raw::c_long,
518    pub rem: ::std::os::raw::c_long,
519}
520impl Clone for imaxdiv_t {
521    fn clone(&self) -> Self {
522        *self
523    }
524}
525#[repr(C)]
526#[derive(Debug, Copy)]
527pub struct json_settings {
528    pub max_memory: ::std::os::raw::c_ulong,
529    pub settings: ::std::os::raw::c_int,
530    pub memory_alloc:
531        ::std::option::Option<unsafe extern "C" fn(arg1: usize,
532                                                   zero: ::std::os::raw::c_int,
533                                                   user_data: *mut ::std::os::raw::c_void)
534                                                   -> *mut ::std::os::raw::c_void>,
535    pub memory_free:
536        ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void,
537                                                   user_data: *mut ::std::os::raw::c_void)>,
538    pub user_data: *mut ::std::os::raw::c_void,
539    pub value_extra: usize,
540}
541impl Clone for json_settings {
542    fn clone(&self) -> Self {
543        *self
544    }
545}
546#[repr(u32)]
547#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
548pub enum json_type {
549    json_none = 0,
550    json_object = 1,
551    json_array = 2,
552    json_integer = 3,
553    json_double = 4,
554    json_string = 5,
555    json_boolean = 6,
556    json_null = 7,
557}
558#[repr(C)]
559#[derive(Debug, Copy)]
560pub struct _json_value {
561    pub parent: *mut _json_value,
562    pub type_: json_type,
563    pub u: _json_value__bindgen_ty_1,
564    pub _reserved: _json_value__bindgen_ty_2,
565}
566#[repr(C)]
567#[derive(Debug, Copy)]
568pub struct _json_value__bindgen_ty_1 {
569    pub boolean: __BindgenUnionField<::std::os::raw::c_int>,
570    pub integer: __BindgenUnionField<i64>,
571    pub dbl: __BindgenUnionField<f64>,
572    pub string: __BindgenUnionField<_json_value__bindgen_ty_1__bindgen_ty_1>,
573    pub object: __BindgenUnionField<_json_value__bindgen_ty_1__bindgen_ty_2>,
574    pub array: __BindgenUnionField<_json_value__bindgen_ty_1__bindgen_ty_3>,
575    pub bindgen_union_field: [u64; 2usize],
576}
577#[repr(C)]
578#[derive(Debug, Copy)]
579pub struct _json_value__bindgen_ty_1__bindgen_ty_1 {
580    pub length: ::std::os::raw::c_uint,
581    pub ptr: *mut ::std::os::raw::c_char,
582}
583impl Clone for _json_value__bindgen_ty_1__bindgen_ty_1 {
584    fn clone(&self) -> Self {
585        *self
586    }
587}
588#[repr(C)]
589#[derive(Debug, Copy)]
590pub struct _json_value__bindgen_ty_1__bindgen_ty_2 {
591    pub length: ::std::os::raw::c_uint,
592    pub values: *mut json_object_entry,
593}
594impl Clone for _json_value__bindgen_ty_1__bindgen_ty_2 {
595    fn clone(&self) -> Self {
596        *self
597    }
598}
599#[repr(C)]
600#[derive(Debug, Copy)]
601pub struct _json_value__bindgen_ty_1__bindgen_ty_3 {
602    pub length: ::std::os::raw::c_uint,
603    pub values: *mut *mut _json_value,
604}
605impl Clone for _json_value__bindgen_ty_1__bindgen_ty_3 {
606    fn clone(&self) -> Self {
607        *self
608    }
609}
610impl Clone for _json_value__bindgen_ty_1 {
611    fn clone(&self) -> Self {
612        *self
613    }
614}
615#[repr(C)]
616#[derive(Debug, Copy)]
617pub struct _json_value__bindgen_ty_2 {
618    pub next_alloc: __BindgenUnionField<*mut _json_value>,
619    pub object_mem: __BindgenUnionField<*mut ::std::os::raw::c_void>,
620    pub bindgen_union_field: u64,
621}
622impl Clone for _json_value__bindgen_ty_2 {
623    fn clone(&self) -> Self {
624        *self
625    }
626}
627impl Clone for _json_value {
628    fn clone(&self) -> Self {
629        *self
630    }
631}
632#[repr(C)]
633#[derive(Debug, Copy)]
634pub struct _json_object_entry {
635    pub name: *mut ::std::os::raw::c_char,
636    pub name_length: ::std::os::raw::c_uint,
637    pub value: *mut _json_value,
638}
639impl Clone for _json_object_entry {
640    fn clone(&self) -> Self {
641        *self
642    }
643}
644pub type json_object_entry = _json_object_entry;
645pub type json_value = _json_value;
646pub type gravity_float_t = f64;
647pub type gravity_int_t = i64;
648#[repr(C)]
649#[derive(Debug, Copy)]
650pub struct gravity_class_s {
651    pub isa: *mut gravity_class_t,
652    pub gc: gravity_gc_t,
653    pub objclass: *mut gravity_class_t,
654    pub identifier: *const ::std::os::raw::c_char,
655    pub has_outer: bool,
656    pub is_struct: bool,
657    pub is_inited: bool,
658    pub unused: bool,
659    pub xdata: *mut ::std::os::raw::c_void,
660    pub superclass: *mut gravity_class_s,
661    pub htable: *mut gravity_hash_t,
662    pub nivars: u32,
663    pub ivars: *mut gravity_value_t,
664}
665impl Clone for gravity_class_s {
666    fn clone(&self) -> Self {
667        *self
668    }
669}
670pub type gravity_class_t = gravity_class_s;
671pub type gravity_object_t = gravity_class_s;
672#[repr(C)]
673#[derive(Debug, Copy)]
674pub struct gravity_value_t {
675    pub isa: *mut gravity_class_t,
676    pub __bindgen_anon_1: gravity_value_t__bindgen_ty_1,
677}
678#[repr(C)]
679#[derive(Debug, Copy)]
680pub struct gravity_value_t__bindgen_ty_1 {
681    pub n: __BindgenUnionField<gravity_int_t>,
682    pub f: __BindgenUnionField<gravity_float_t>,
683    pub p: __BindgenUnionField<*mut gravity_object_t>,
684    pub bindgen_union_field: u64,
685}
686impl Clone for gravity_value_t__bindgen_ty_1 {
687    fn clone(&self) -> Self {
688        *self
689    }
690}
691impl Clone for gravity_value_t {
692    fn clone(&self) -> Self {
693        *self
694    }
695}
696#[repr(C)]
697#[derive(Debug, Copy)]
698pub struct gravity_value_r {
699    pub n: usize,
700    pub m: usize,
701    pub p: *mut gravity_value_t,
702}
703impl Clone for gravity_value_r {
704    fn clone(&self) -> Self {
705        *self
706    }
707}
708#[repr(C)]
709#[derive(Debug, Copy, Clone)]
710pub struct gravity_hash_t([u8; 0]);
711#[repr(C)]
712#[derive(Debug, Copy, Clone)]
713pub struct gravity_vm([u8; 0]);
714pub type gravity_c_internal =
715    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
716                                               args: *mut gravity_value_t,
717                                               nargs: u16,
718                                               rindex: u32)
719                                               -> bool>;
720#[repr(u32)]
721#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
722pub enum gravity_special_index {
723    EXEC_TYPE_SPECIAL_GETTER = 0,
724    EXEC_TYPE_SPECIAL_SETTER = 1,
725}
726#[repr(u32)]
727#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
728pub enum gravity_exec_type {
729    EXEC_TYPE_NATIVE = 0,
730    EXEC_TYPE_INTERNAL = 1,
731    EXEC_TYPE_BRIDGED = 2,
732    EXEC_TYPE_SPECIAL = 3,
733}
734#[repr(C)]
735#[derive(Debug, Copy)]
736pub struct gravity_gc_t {
737    pub isdark: bool,
738    pub next: *mut gravity_object_t,
739}
740impl Clone for gravity_gc_t {
741    fn clone(&self) -> Self {
742        *self
743    }
744}
745#[repr(C)]
746#[derive(Debug, Copy)]
747pub struct gravity_function_t {
748    pub isa: *mut gravity_class_t,
749    pub gc: gravity_gc_t,
750    pub xdata: *mut ::std::os::raw::c_void,
751    pub identifier: *const ::std::os::raw::c_char,
752    pub nparams: u16,
753    pub nlocals: u16,
754    pub ntemps: u16,
755    pub nupvalues: u16,
756    pub tag: gravity_exec_type,
757    pub __bindgen_anon_1: gravity_function_t__bindgen_ty_1,
758}
759#[repr(C)]
760#[derive(Debug, Copy)]
761pub struct gravity_function_t__bindgen_ty_1 {
762    pub __bindgen_anon_1: __BindgenUnionField<gravity_function_t__bindgen_ty_1__bindgen_ty_1>,
763    pub internal: __BindgenUnionField<gravity_c_internal>,
764    pub __bindgen_anon_2: __BindgenUnionField<gravity_function_t__bindgen_ty_1__bindgen_ty_2>,
765    pub bindgen_union_field: [u64; 6usize],
766}
767#[repr(C)]
768#[derive(Debug, Copy)]
769pub struct gravity_function_t__bindgen_ty_1__bindgen_ty_1 {
770    pub cpool: gravity_value_r,
771    pub ninsts: u32,
772    pub bytecode: *mut u32,
773    pub purity: f32,
774    pub useargs: bool,
775}
776impl Clone for gravity_function_t__bindgen_ty_1__bindgen_ty_1 {
777    fn clone(&self) -> Self {
778        *self
779    }
780}
781#[repr(C)]
782#[derive(Debug, Copy)]
783pub struct gravity_function_t__bindgen_ty_1__bindgen_ty_2 {
784    pub index: u16,
785    pub special: [*mut ::std::os::raw::c_void; 2usize],
786}
787impl Clone for gravity_function_t__bindgen_ty_1__bindgen_ty_2 {
788    fn clone(&self) -> Self {
789        *self
790    }
791}
792impl Clone for gravity_function_t__bindgen_ty_1 {
793    fn clone(&self) -> Self {
794        *self
795    }
796}
797impl Clone for gravity_function_t {
798    fn clone(&self) -> Self {
799        *self
800    }
801}
802#[repr(C)]
803#[derive(Debug, Copy)]
804pub struct upvalue_s {
805    pub isa: *mut gravity_class_t,
806    pub gc: gravity_gc_t,
807    pub value: *mut gravity_value_t,
808    pub closed: gravity_value_t,
809    pub next: *mut upvalue_s,
810}
811impl Clone for upvalue_s {
812    fn clone(&self) -> Self {
813        *self
814    }
815}
816pub type gravity_upvalue_t = upvalue_s;
817#[repr(C)]
818#[derive(Debug, Copy)]
819pub struct gravity_closure_t {
820    pub isa: *mut gravity_class_t,
821    pub gc: gravity_gc_t,
822    pub f: *mut gravity_function_t,
823    pub upvalue: *mut *mut gravity_upvalue_t,
824}
825impl Clone for gravity_closure_t {
826    fn clone(&self) -> Self {
827        *self
828    }
829}
830#[repr(C)]
831#[derive(Debug, Copy)]
832pub struct gravity_list_t {
833    pub isa: *mut gravity_class_t,
834    pub gc: gravity_gc_t,
835    pub array: gravity_value_r,
836}
837impl Clone for gravity_list_t {
838    fn clone(&self) -> Self {
839        *self
840    }
841}
842#[repr(C)]
843#[derive(Debug, Copy)]
844pub struct gravity_map_t {
845    pub isa: *mut gravity_class_t,
846    pub gc: gravity_gc_t,
847    pub hash: *mut gravity_hash_t,
848}
849impl Clone for gravity_map_t {
850    fn clone(&self) -> Self {
851        *self
852    }
853}
854#[repr(C)]
855#[derive(Debug, Copy)]
856pub struct gravity_callframe_t {
857    pub ip: *mut u32,
858    pub dest: u32,
859    pub nargs: u16,
860    pub args: *mut gravity_list_t,
861    pub closure: *mut gravity_closure_t,
862    pub stackstart: *mut gravity_value_t,
863    pub outloop: bool,
864}
865impl Clone for gravity_callframe_t {
866    fn clone(&self) -> Self {
867        *self
868    }
869}
870#[repr(C)]
871#[derive(Debug, Copy)]
872pub struct fiber_s {
873    pub isa: *mut gravity_class_t,
874    pub gc: gravity_gc_t,
875    pub stack: *mut gravity_value_t,
876    pub stacktop: *mut gravity_value_t,
877    pub stackalloc: u32,
878    pub frames: *mut gravity_callframe_t,
879    pub nframes: u32,
880    pub framesalloc: u32,
881    pub upvalues: *mut gravity_upvalue_t,
882    pub error: *mut ::std::os::raw::c_char,
883    pub trying: bool,
884    pub caller: *mut fiber_s,
885    pub result: gravity_value_t,
886}
887impl Clone for fiber_s {
888    fn clone(&self) -> Self {
889        *self
890    }
891}
892pub type gravity_fiber_t = fiber_s;
893#[repr(C)]
894#[derive(Debug, Copy)]
895pub struct gravity_module_t {
896    pub isa: *mut gravity_class_t,
897    pub gc: gravity_gc_t,
898    pub identifier: *const ::std::os::raw::c_char,
899    pub htable: *mut gravity_hash_t,
900}
901impl Clone for gravity_module_t {
902    fn clone(&self) -> Self {
903        *self
904    }
905}
906#[repr(C)]
907#[derive(Debug, Copy)]
908pub struct gravity_instance_t {
909    pub isa: *mut gravity_class_t,
910    pub gc: gravity_gc_t,
911    pub objclass: *mut gravity_class_t,
912    pub xdata: *mut ::std::os::raw::c_void,
913    pub ivars: __IncompleteArrayField<gravity_value_t>,
914}
915impl Clone for gravity_instance_t {
916    fn clone(&self) -> Self {
917        *self
918    }
919}
920#[repr(C)]
921#[derive(Debug, Copy)]
922pub struct gravity_string_t {
923    pub isa: *mut gravity_class_t,
924    pub gc: gravity_gc_t,
925    pub s: *mut ::std::os::raw::c_char,
926    pub hash: u32,
927    pub len: u32,
928    pub alloc: u32,
929}
930impl Clone for gravity_string_t {
931    fn clone(&self) -> Self {
932        *self
933    }
934}
935#[repr(C)]
936#[derive(Debug, Copy)]
937pub struct gravity_range_t {
938    pub isa: *mut gravity_class_t,
939    pub gc: gravity_gc_t,
940    pub from: gravity_int_t,
941    pub to: gravity_int_t,
942}
943impl Clone for gravity_range_t {
944    fn clone(&self) -> Self {
945        *self
946    }
947}
948pub type code_dump_function =
949    ::std::option::Option<unsafe extern "C" fn(code: *mut ::std::os::raw::c_void)>;
950#[repr(C)]
951#[derive(Debug, Copy)]
952pub struct gravity_function_r {
953    pub n: usize,
954    pub m: usize,
955    pub p: *mut *mut gravity_function_t,
956}
957impl Clone for gravity_function_r {
958    fn clone(&self) -> Self {
959        *self
960    }
961}
962#[repr(C)]
963#[derive(Debug, Copy)]
964pub struct gravity_class_r {
965    pub n: usize,
966    pub m: usize,
967    pub p: *mut *mut gravity_class_t,
968}
969impl Clone for gravity_class_r {
970    fn clone(&self) -> Self {
971        *self
972    }
973}
974#[repr(C)]
975#[derive(Debug, Copy)]
976pub struct gravity_object_r {
977    pub n: usize,
978    pub m: usize,
979    pub p: *mut *mut gravity_object_t,
980}
981impl Clone for gravity_object_r {
982    fn clone(&self) -> Self {
983        *self
984    }
985}
986#[repr(u32)]
987#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
988pub enum error_type_t {
989    GRAVITY_ERROR_NONE = 0,
990    GRAVITY_ERROR_SYNTAX = 1,
991    GRAVITY_ERROR_SEMANTIC = 2,
992    GRAVITY_ERROR_RUNTIME = 3,
993    GRAVITY_ERROR_IO = 4,
994    GRAVITY_WARNING = 5,
995}
996#[repr(C)]
997#[derive(Debug, Copy)]
998pub struct error_desc_t {
999    pub lineno: u32,
1000    pub colno: u32,
1001    pub fileid: u32,
1002    pub offset: u32,
1003    pub meta: *mut ::std::os::raw::c_void,
1004}
1005impl Clone for error_desc_t {
1006    fn clone(&self) -> Self {
1007        *self
1008    }
1009}
1010pub type gravity_log_callback =
1011    ::std::option::Option<unsafe extern "C" fn(message: *const ::std::os::raw::c_char,
1012                                               xdata: *mut ::std::os::raw::c_void)>;
1013pub type gravity_error_callback =
1014    ::std::option::Option<unsafe extern "C" fn(error_type: error_type_t,
1015                                               description: *const ::std::os::raw::c_char,
1016                                               error_desc: error_desc_t,
1017                                               xdata: *mut ::std::os::raw::c_void)>;
1018pub type gravity_unittest_callback =
1019    ::std::option::Option<unsafe extern "C" fn(error_type: error_type_t,
1020                                               desc: *const ::std::os::raw::c_char,
1021                                               note: *const ::std::os::raw::c_char,
1022                                               value: gravity_value_t,
1023                                               row: i32,
1024                                               col: i32,
1025                                               xdata: *mut ::std::os::raw::c_void)>;
1026pub type gravity_parser_callback =
1027    ::std::option::Option<unsafe extern "C" fn(token: *mut ::std::os::raw::c_void,
1028                                               xdata: *mut ::std::os::raw::c_void)>;
1029pub type gravity_precode_callback =
1030    ::std::option::Option<unsafe extern "C" fn(xdata: *mut ::std::os::raw::c_void)
1031                                               -> *const ::std::os::raw::c_char>;
1032pub type gravity_loadfile_callback =
1033    ::std::option::Option<unsafe extern "C" fn(file: *const ::std::os::raw::c_char,
1034                                               size: *mut usize,
1035                                               fileid: *mut u32,
1036                                               xdata: *mut ::std::os::raw::c_void)
1037                                               -> *const ::std::os::raw::c_char>;
1038pub type gravity_filename_callback =
1039    ::std::option::Option<unsafe extern "C" fn(fileid: u32, xdata: *mut ::std::os::raw::c_void)
1040                                               -> *const ::std::os::raw::c_char>;
1041pub type gravity_bridge_initinstance =
1042    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1043                                               xdata: *mut ::std::os::raw::c_void,
1044                                               instance: *mut gravity_instance_t,
1045                                               args: *mut gravity_value_t,
1046                                               nargs: i16)
1047                                               -> bool>;
1048pub type gravity_bridge_setvalue =
1049    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1050                                               xdata: *mut ::std::os::raw::c_void,
1051                                               target: gravity_value_t,
1052                                               key: *const ::std::os::raw::c_char,
1053                                               value: gravity_value_t)
1054                                               -> bool>;
1055pub type gravity_bridge_getvalue =
1056    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1057                                               xdata: *mut ::std::os::raw::c_void,
1058                                               target: gravity_value_t,
1059                                               key: *const ::std::os::raw::c_char,
1060                                               vindex: u32)
1061                                               -> bool>;
1062pub type gravity_bridge_setundef =
1063    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1064                                               xdata: *mut ::std::os::raw::c_void,
1065                                               target: gravity_value_t,
1066                                               key: *const ::std::os::raw::c_char,
1067                                               value: gravity_value_t)
1068                                               -> bool>;
1069pub type gravity_bridge_getundef =
1070    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1071                                               xdata: *mut ::std::os::raw::c_void,
1072                                               target: gravity_value_t,
1073                                               key: *const ::std::os::raw::c_char,
1074                                               vindex: u32)
1075                                               -> bool>;
1076pub type gravity_bridge_execute =
1077    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1078                                               xdata: *mut ::std::os::raw::c_void,
1079                                               args: *mut gravity_value_t,
1080                                               nargs: i16,
1081                                               vindex: u32)
1082                                               -> bool>;
1083pub type gravity_bridge_size =
1084    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm, obj: *mut gravity_object_t)
1085                                               -> u32>;
1086pub type gravity_bridge_free =
1087    ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm, obj: *mut gravity_object_t)>;
1088#[repr(C)]
1089#[derive(Debug, Copy)]
1090pub struct gravity_delegate_t {
1091    pub xdata: *mut ::std::os::raw::c_void,
1092    pub log_callback: gravity_log_callback,
1093    pub error_callback: gravity_error_callback,
1094    pub unittest_callback: gravity_unittest_callback,
1095    pub parser_callback: gravity_parser_callback,
1096    pub precode_callback: gravity_precode_callback,
1097    pub loadfile_callback: gravity_loadfile_callback,
1098    pub filename_callback: gravity_filename_callback,
1099    pub bridge_initinstance: gravity_bridge_initinstance,
1100    pub bridge_setvalue: gravity_bridge_setvalue,
1101    pub bridge_getvalue: gravity_bridge_getvalue,
1102    pub bridge_setundef: gravity_bridge_setundef,
1103    pub bridge_getundef: gravity_bridge_getundef,
1104    pub bridge_execute: gravity_bridge_execute,
1105    pub bridge_size: gravity_bridge_size,
1106    pub bridge_free: gravity_bridge_free,
1107}
1108impl Clone for gravity_delegate_t {
1109    fn clone(&self) -> Self {
1110        *self
1111    }
1112}
1113#[repr(u32)]
1114#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1115pub enum gtoken_t {
1116    TOK_EOF = 0,
1117    TOK_ERROR = 1,
1118    TOK_COMMENT = 2,
1119    TOK_STRING = 3,
1120    TOK_NUMBER = 4,
1121    TOK_IDENTIFIER = 5,
1122    TOK_SPECIAL = 6,
1123    TOK_MACRO = 7,
1124    TOK_KEY_FUNC = 8,
1125    TOK_KEY_SUPER = 9,
1126    TOK_KEY_DEFAULT = 10,
1127    TOK_KEY_TRUE = 11,
1128    TOK_KEY_FALSE = 12,
1129    TOK_KEY_IF = 13,
1130    TOK_KEY_ELSE = 14,
1131    TOK_KEY_SWITCH = 15,
1132    TOK_KEY_BREAK = 16,
1133    TOK_KEY_CONTINUE = 17,
1134    TOK_KEY_RETURN = 18,
1135    TOK_KEY_WHILE = 19,
1136    TOK_KEY_REPEAT = 20,
1137    TOK_KEY_FOR = 21,
1138    TOK_KEY_IN = 22,
1139    TOK_KEY_ENUM = 23,
1140    TOK_KEY_CLASS = 24,
1141    TOK_KEY_STRUCT = 25,
1142    TOK_KEY_PRIVATE = 26,
1143    TOK_KEY_FILE = 27,
1144    TOK_KEY_INTERNAL = 28,
1145    TOK_KEY_PUBLIC = 29,
1146    TOK_KEY_STATIC = 30,
1147    TOK_KEY_EXTERN = 31,
1148    TOK_KEY_LAZY = 32,
1149    TOK_KEY_CONST = 33,
1150    TOK_KEY_VAR = 34,
1151    TOK_KEY_MODULE = 35,
1152    TOK_KEY_IMPORT = 36,
1153    TOK_KEY_CASE = 37,
1154    TOK_KEY_EVENT = 38,
1155    TOK_KEY_NULL = 39,
1156    TOK_KEY_UNDEFINED = 40,
1157    TOK_KEY_ISA = 41,
1158    TOK_KEY_CURRFUNC = 42,
1159    TOK_KEY_CURRARGS = 43,
1160    TOK_OP_SHIFT_LEFT = 44,
1161    TOK_OP_SHIFT_RIGHT = 45,
1162    TOK_OP_MUL = 46,
1163    TOK_OP_DIV = 47,
1164    TOK_OP_REM = 48,
1165    TOK_OP_BIT_AND = 49,
1166    TOK_OP_ADD = 50,
1167    TOK_OP_SUB = 51,
1168    TOK_OP_BIT_OR = 52,
1169    TOK_OP_BIT_XOR = 53,
1170    TOK_OP_BIT_NOT = 54,
1171    TOK_OP_RANGE_EXCLUDED = 55,
1172    TOK_OP_RANGE_INCLUDED = 56,
1173    TOK_OP_LESS = 57,
1174    TOK_OP_LESS_EQUAL = 58,
1175    TOK_OP_GREATER = 59,
1176    TOK_OP_GREATER_EQUAL = 60,
1177    TOK_OP_ISEQUAL = 61,
1178    TOK_OP_ISNOTEQUAL = 62,
1179    TOK_OP_ISIDENTICAL = 63,
1180    TOK_OP_ISNOTIDENTICAL = 64,
1181    TOK_OP_PATTERN_MATCH = 65,
1182    TOK_OP_AND = 66,
1183    TOK_OP_OR = 67,
1184    TOK_OP_TERNARY = 68,
1185    TOK_OP_ASSIGN = 69,
1186    TOK_OP_MUL_ASSIGN = 70,
1187    TOK_OP_DIV_ASSIGN = 71,
1188    TOK_OP_REM_ASSIGN = 72,
1189    TOK_OP_ADD_ASSIGN = 73,
1190    TOK_OP_SUB_ASSIGN = 74,
1191    TOK_OP_SHIFT_LEFT_ASSIGN = 75,
1192    TOK_OP_SHIFT_RIGHT_ASSIGN = 76,
1193    TOK_OP_BIT_AND_ASSIGN = 77,
1194    TOK_OP_BIT_OR_ASSIGN = 78,
1195    TOK_OP_BIT_XOR_ASSIGN = 79,
1196    TOK_OP_NOT = 80,
1197    TOK_OP_SEMICOLON = 81,
1198    TOK_OP_OPEN_PARENTHESIS = 82,
1199    TOK_OP_COLON = 83,
1200    TOK_OP_COMMA = 84,
1201    TOK_OP_DOT = 85,
1202    TOK_OP_CLOSED_PARENTHESIS = 86,
1203    TOK_OP_OPEN_SQUAREBRACKET = 87,
1204    TOK_OP_CLOSED_SQUAREBRACKET = 88,
1205    TOK_OP_OPEN_CURLYBRACE = 89,
1206    TOK_OP_CLOSED_CURLYBRACE = 90,
1207    TOK_END = 91,
1208}
1209#[repr(u32)]
1210#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1211pub enum gliteral_t {
1212    LITERAL_STRING = 0,
1213    LITERAL_FLOAT = 1,
1214    LITERAL_INT = 2,
1215    LITERAL_BOOL = 3,
1216    LITERAL_STRING_INTERPOLATED = 4,
1217}
1218#[repr(u32)]
1219#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1220pub enum gbuiltin_t {
1221    BUILTIN_NONE = 0,
1222    BUILTIN_LINE = 1,
1223    BUILTIN_COLUMN = 2,
1224    BUILTIN_FILE = 3,
1225    BUILTIN_FUNC = 4,
1226    BUILTIN_CLASS = 5,
1227}
1228#[repr(C)]
1229#[derive(Debug, Copy)]
1230pub struct gtoken_s {
1231    pub type_: gtoken_t,
1232    pub lineno: u32,
1233    pub colno: u32,
1234    pub position: u32,
1235    pub bytes: u32,
1236    pub length: u32,
1237    pub fileid: u32,
1238    pub builtin: gbuiltin_t,
1239    pub value: *const ::std::os::raw::c_char,
1240}
1241impl Clone for gtoken_s {
1242    fn clone(&self) -> Self {
1243        *self
1244    }
1245}
1246#[repr(u32)]
1247#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1248pub enum gnode_n {
1249    NODE_LIST_STAT = 0,
1250    NODE_COMPOUND_STAT = 1,
1251    NODE_LABEL_STAT = 2,
1252    NODE_FLOW_STAT = 3,
1253    NODE_JUMP_STAT = 4,
1254    NODE_LOOP_STAT = 5,
1255    NODE_EMPTY_STAT = 6,
1256    NODE_ENUM_DECL = 7,
1257    NODE_FUNCTION_DECL = 8,
1258    NODE_VARIABLE_DECL = 9,
1259    NODE_CLASS_DECL = 10,
1260    NODE_MODULE_DECL = 11,
1261    NODE_VARIABLE = 12,
1262    NODE_BINARY_EXPR = 13,
1263    NODE_UNARY_EXPR = 14,
1264    NODE_FILE_EXPR = 15,
1265    NODE_LIST_EXPR = 16,
1266    NODE_LITERAL_EXPR = 17,
1267    NODE_IDENTIFIER_EXPR = 18,
1268    NODE_POSTFIX_EXPR = 19,
1269    NODE_KEYWORD_EXPR = 20,
1270    NODE_CALL_EXPR = 21,
1271    NODE_SUBSCRIPT_EXPR = 22,
1272    NODE_ACCESS_EXPR = 23,
1273}
1274#[repr(u32)]
1275#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1276pub enum gnode_location_type {
1277    LOCATION_LOCAL = 0,
1278    LOCATION_GLOBAL = 1,
1279    LOCATION_UPVALUE = 2,
1280    LOCATION_CLASS_IVAR_SAME = 3,
1281    LOCATION_CLASS_IVAR_OUTER = 4,
1282}
1283#[repr(C)]
1284#[derive(Debug, Copy)]
1285pub struct gnode_t {
1286    pub tag: gnode_n,
1287    pub refcount: u32,
1288    pub token: gtoken_s,
1289    pub is_assignment: bool,
1290    pub meta: *mut ::std::os::raw::c_void,
1291    pub decl: *mut ::std::os::raw::c_void,
1292}
1293impl Clone for gnode_t {
1294    fn clone(&self) -> Self {
1295        *self
1296    }
1297}
1298#[repr(C)]
1299#[derive(Debug, Copy)]
1300pub struct gupvalue_t {
1301    pub node: *mut gnode_t,
1302    pub index: u32,
1303    pub selfindex: u32,
1304    pub is_direct: bool,
1305}
1306impl Clone for gupvalue_t {
1307    fn clone(&self) -> Self {
1308        *self
1309    }
1310}
1311#[repr(C)]
1312#[derive(Debug, Copy)]
1313pub struct gnode_r {
1314    pub n: usize,
1315    pub m: usize,
1316    pub p: *mut *mut gnode_t,
1317}
1318impl Clone for gnode_r {
1319    fn clone(&self) -> Self {
1320        *self
1321    }
1322}
1323#[repr(C)]
1324#[derive(Debug, Copy)]
1325pub struct gupvalue_r {
1326    pub n: usize,
1327    pub m: usize,
1328    pub p: *mut *mut gupvalue_t,
1329}
1330impl Clone for gupvalue_r {
1331    fn clone(&self) -> Self {
1332        *self
1333    }
1334}
1335#[repr(C)]
1336#[derive(Debug, Copy, Clone)]
1337pub struct symboltable_t([u8; 0]);
1338#[repr(C)]
1339#[derive(Debug, Copy)]
1340pub struct gnode_location_t {
1341    pub type_: gnode_location_type,
1342    pub index: u16,
1343    pub nup: u16,
1344}
1345impl Clone for gnode_location_t {
1346    fn clone(&self) -> Self {
1347        *self
1348    }
1349}
1350#[repr(C)]
1351#[derive(Debug, Copy)]
1352pub struct gnode_compound_stmt_t {
1353    pub base: gnode_t,
1354    pub symtable: *mut symboltable_t,
1355    pub stmts: *mut gnode_r,
1356    pub nclose: u32,
1357}
1358impl Clone for gnode_compound_stmt_t {
1359    fn clone(&self) -> Self {
1360        *self
1361    }
1362}
1363pub type gnode_list_stmt_t = gnode_compound_stmt_t;
1364#[repr(C)]
1365#[derive(Debug, Copy)]
1366pub struct gnode_label_stmt_t {
1367    pub base: gnode_t,
1368    pub expr: *mut gnode_t,
1369    pub stmt: *mut gnode_t,
1370}
1371impl Clone for gnode_label_stmt_t {
1372    fn clone(&self) -> Self {
1373        *self
1374    }
1375}
1376#[repr(C)]
1377#[derive(Debug, Copy)]
1378pub struct gnode_flow_stmt_t {
1379    pub base: gnode_t,
1380    pub cond: *mut gnode_t,
1381    pub stmt: *mut gnode_t,
1382    pub elsestmt: *mut gnode_t,
1383}
1384impl Clone for gnode_flow_stmt_t {
1385    fn clone(&self) -> Self {
1386        *self
1387    }
1388}
1389#[repr(C)]
1390#[derive(Debug, Copy)]
1391pub struct gnode_loop_stmt_t {
1392    pub base: gnode_t,
1393    pub cond: *mut gnode_t,
1394    pub stmt: *mut gnode_t,
1395    pub expr: *mut gnode_t,
1396    pub nclose: u32,
1397}
1398impl Clone for gnode_loop_stmt_t {
1399    fn clone(&self) -> Self {
1400        *self
1401    }
1402}
1403#[repr(C)]
1404#[derive(Debug, Copy)]
1405pub struct gnode_jump_stmt_t {
1406    pub base: gnode_t,
1407    pub expr: *mut gnode_t,
1408}
1409impl Clone for gnode_jump_stmt_t {
1410    fn clone(&self) -> Self {
1411        *self
1412    }
1413}
1414#[repr(C)]
1415#[derive(Debug, Copy)]
1416pub struct gnode_function_decl_t {
1417    pub base: gnode_t,
1418    pub env: *mut gnode_t,
1419    pub access: gtoken_t,
1420    pub storage: gtoken_t,
1421    pub symtable: *mut symboltable_t,
1422    pub identifier: *const ::std::os::raw::c_char,
1423    pub params: *mut gnode_r,
1424    pub block: *mut gnode_compound_stmt_t,
1425    pub nlocals: u16,
1426    pub nparams: u16,
1427    pub uplist: *mut gupvalue_r,
1428}
1429impl Clone for gnode_function_decl_t {
1430    fn clone(&self) -> Self {
1431        *self
1432    }
1433}
1434pub type gnode_function_expr_t = gnode_function_decl_t;
1435#[repr(C)]
1436#[derive(Debug, Copy)]
1437pub struct gnode_var_t {
1438    pub base: gnode_t,
1439    pub env: *mut gnode_t,
1440    pub identifier: *const ::std::os::raw::c_char,
1441    pub annotation_type: *const ::std::os::raw::c_char,
1442    pub expr: *mut gnode_t,
1443    pub access: gtoken_t,
1444    pub index: u16,
1445    pub upvalue: bool,
1446}
1447impl Clone for gnode_var_t {
1448    fn clone(&self) -> Self {
1449        *self
1450    }
1451}
1452#[repr(C)]
1453#[derive(Debug, Copy)]
1454pub struct gnode_variable_decl_t {
1455    pub base: gnode_t,
1456    pub type_: gtoken_t,
1457    pub access: gtoken_t,
1458    pub storage: gtoken_t,
1459    pub decls: *mut gnode_r,
1460}
1461impl Clone for gnode_variable_decl_t {
1462    fn clone(&self) -> Self {
1463        *self
1464    }
1465}
1466#[repr(C)]
1467#[derive(Debug, Copy)]
1468pub struct gnode_enum_decl_t {
1469    pub base: gnode_t,
1470    pub env: *mut gnode_t,
1471    pub access: gtoken_t,
1472    pub storage: gtoken_t,
1473    pub symtable: *mut symboltable_t,
1474    pub identifier: *const ::std::os::raw::c_char,
1475}
1476impl Clone for gnode_enum_decl_t {
1477    fn clone(&self) -> Self {
1478        *self
1479    }
1480}
1481#[repr(C)]
1482#[derive(Debug, Copy)]
1483pub struct gnode_class_decl_t {
1484    pub base: gnode_t,
1485    pub bridge: bool,
1486    pub is_struct: bool,
1487    pub env: *mut gnode_t,
1488    pub access: gtoken_t,
1489    pub storage: gtoken_t,
1490    pub identifier: *const ::std::os::raw::c_char,
1491    pub superclass: *mut gnode_t,
1492    pub protocols: *mut gnode_r,
1493    pub decls: *mut gnode_r,
1494    pub symtable: *mut symboltable_t,
1495    pub data: *mut ::std::os::raw::c_void,
1496    pub nivar: u32,
1497    pub nsvar: u32,
1498}
1499impl Clone for gnode_class_decl_t {
1500    fn clone(&self) -> Self {
1501        *self
1502    }
1503}
1504#[repr(C)]
1505#[derive(Debug, Copy)]
1506pub struct gnode_module_decl_t {
1507    pub base: gnode_t,
1508    pub env: *mut gnode_t,
1509    pub access: gtoken_t,
1510    pub storage: gtoken_t,
1511    pub identifier: *const ::std::os::raw::c_char,
1512    pub decls: *mut gnode_r,
1513    pub symtable: *mut symboltable_t,
1514}
1515impl Clone for gnode_module_decl_t {
1516    fn clone(&self) -> Self {
1517        *self
1518    }
1519}
1520#[repr(C)]
1521#[derive(Debug, Copy)]
1522pub struct gnode_binary_expr_t {
1523    pub base: gnode_t,
1524    pub op: gtoken_t,
1525    pub left: *mut gnode_t,
1526    pub right: *mut gnode_t,
1527}
1528impl Clone for gnode_binary_expr_t {
1529    fn clone(&self) -> Self {
1530        *self
1531    }
1532}
1533#[repr(C)]
1534#[derive(Debug, Copy)]
1535pub struct gnode_unary_expr_t {
1536    pub base: gnode_t,
1537    pub op: gtoken_t,
1538    pub expr: *mut gnode_t,
1539}
1540impl Clone for gnode_unary_expr_t {
1541    fn clone(&self) -> Self {
1542        *self
1543    }
1544}
1545#[repr(C)]
1546#[derive(Debug, Copy)]
1547pub struct gnode_file_expr_t {
1548    pub base: gnode_t,
1549    pub identifiers: *mut cstring_r,
1550    pub location: gnode_location_t,
1551}
1552impl Clone for gnode_file_expr_t {
1553    fn clone(&self) -> Self {
1554        *self
1555    }
1556}
1557#[repr(C)]
1558#[derive(Debug, Copy)]
1559pub struct gnode_literal_expr_t {
1560    pub base: gnode_t,
1561    pub type_: gliteral_t,
1562    pub len: u32,
1563    pub value: gnode_literal_expr_t__bindgen_ty_1,
1564}
1565#[repr(C)]
1566#[derive(Debug, Copy)]
1567pub struct gnode_literal_expr_t__bindgen_ty_1 {
1568    pub str: __BindgenUnionField<*mut ::std::os::raw::c_char>,
1569    pub d: __BindgenUnionField<f64>,
1570    pub n64: __BindgenUnionField<i64>,
1571    pub r: __BindgenUnionField<*mut gnode_r>,
1572    pub bindgen_union_field: u64,
1573}
1574impl Clone for gnode_literal_expr_t__bindgen_ty_1 {
1575    fn clone(&self) -> Self {
1576        *self
1577    }
1578}
1579impl Clone for gnode_literal_expr_t {
1580    fn clone(&self) -> Self {
1581        *self
1582    }
1583}
1584#[repr(C)]
1585#[derive(Debug, Copy)]
1586pub struct gnode_identifier_expr_t {
1587    pub base: gnode_t,
1588    pub value: *const ::std::os::raw::c_char,
1589    pub value2: *const ::std::os::raw::c_char,
1590    pub symbol: *mut gnode_t,
1591    pub location: gnode_location_t,
1592    pub upvalue: *mut gupvalue_t,
1593}
1594impl Clone for gnode_identifier_expr_t {
1595    fn clone(&self) -> Self {
1596        *self
1597    }
1598}
1599#[repr(C)]
1600#[derive(Debug, Copy)]
1601pub struct gnode_keyword_expr_t {
1602    pub base: gnode_t,
1603}
1604impl Clone for gnode_keyword_expr_t {
1605    fn clone(&self) -> Self {
1606        *self
1607    }
1608}
1609pub type gnode_empty_stmt_t = gnode_keyword_expr_t;
1610pub type gnode_base_t = gnode_keyword_expr_t;
1611#[repr(C)]
1612#[derive(Debug, Copy)]
1613pub struct gnode_postfix_expr_t {
1614    pub base: gnode_t,
1615    pub id: *mut gnode_t,
1616    pub list: *mut gnode_r,
1617}
1618impl Clone for gnode_postfix_expr_t {
1619    fn clone(&self) -> Self {
1620        *self
1621    }
1622}
1623#[repr(C)]
1624#[derive(Debug, Copy)]
1625pub struct gnode_postfix_subexpr_t {
1626    pub base: gnode_t,
1627    pub __bindgen_anon_1: gnode_postfix_subexpr_t__bindgen_ty_1,
1628}
1629#[repr(C)]
1630#[derive(Debug, Copy)]
1631pub struct gnode_postfix_subexpr_t__bindgen_ty_1 {
1632    pub expr: __BindgenUnionField<*mut gnode_t>,
1633    pub args: __BindgenUnionField<*mut gnode_r>,
1634    pub bindgen_union_field: u64,
1635}
1636impl Clone for gnode_postfix_subexpr_t__bindgen_ty_1 {
1637    fn clone(&self) -> Self {
1638        *self
1639    }
1640}
1641impl Clone for gnode_postfix_subexpr_t {
1642    fn clone(&self) -> Self {
1643        *self
1644    }
1645}
1646#[repr(C)]
1647#[derive(Debug, Copy)]
1648pub struct gnode_list_expr_t {
1649    pub base: gnode_t,
1650    pub ismap: bool,
1651    pub list1: *mut gnode_r,
1652    pub list2: *mut gnode_r,
1653}
1654impl Clone for gnode_list_expr_t {
1655    fn clone(&self) -> Self {
1656        *self
1657    }
1658}
1659#[repr(C)]
1660#[derive(Debug, Copy, Clone)]
1661pub struct gravity_compiler_t([u8; 0]);
1662pub type vm_filter_cb = ::std::option::Option<unsafe extern "C" fn(obj: *mut gravity_object_t)
1663                                                                   -> bool>;
1664pub type vm_transfer_cb = ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm,
1665                                                                     obj: *mut gravity_object_t)>;
1666pub type vm_cleanup_cb = ::std::option::Option<unsafe extern "C" fn(vm: *mut gravity_vm)>;
1667
1668
1669extern "C" {
1670    pub fn opendir(__name: *const ::std::os::raw::c_char) -> *mut DIR;
1671    pub fn fdopendir(__fd: ::std::os::raw::c_int) -> *mut DIR;
1672    pub fn closedir(__dirp: *mut DIR) -> ::std::os::raw::c_int;
1673    pub fn readdir(__dirp: *mut DIR) -> *mut dirent;
1674    pub fn readdir_r(__dirp: *mut DIR,
1675                     __entry: *mut dirent,
1676                     __result: *mut *mut dirent)
1677                     -> ::std::os::raw::c_int;
1678    pub fn rewinddir(__dirp: *mut DIR);
1679    pub fn seekdir(__dirp: *mut DIR, __pos: ::std::os::raw::c_long);
1680    pub fn telldir(__dirp: *mut DIR) -> ::std::os::raw::c_long;
1681    pub fn dirfd(__dirp: *mut DIR) -> ::std::os::raw::c_int;
1682    pub fn scandir(__dir: *const ::std::os::raw::c_char,
1683                   __namelist: *mut *mut *mut dirent,
1684                   __selector:
1685                       ::std::option::Option<unsafe extern "C" fn(arg1:
1686                                                                      *const dirent)
1687                                                 -> ::std::os::raw::c_int>,
1688                   __cmp:
1689                       ::std::option::Option<unsafe extern "C" fn(arg1:
1690                                                                      *mut *const dirent,
1691                                                                  arg2:
1692                                                                      *mut *const dirent)
1693                                                 -> ::std::os::raw::c_int>)
1694-> ::std::os::raw::c_int;
1695    pub fn alphasort(__e1: *mut *const dirent, __e2: *mut *const dirent) -> ::std::os::raw::c_int;
1696    pub fn getdirentries(__fd: ::std::os::raw::c_int,
1697                         __buf: *mut ::std::os::raw::c_char,
1698                         __nbytes: usize,
1699                         __basep: *mut __off_t)
1700                         -> __ssize_t;
1701    pub fn nanotime() -> nanotime_t;
1702    pub fn microtime(tstart: nanotime_t, tend: nanotime_t) -> f64;
1703    pub fn millitime(tstart: nanotime_t, tend: nanotime_t) -> f64;
1704    pub fn readline(prompt: *mut ::std::os::raw::c_char,
1705                    length: *mut ::std::os::raw::c_int)
1706                    -> *mut ::std::os::raw::c_char;
1707    pub fn file_size(path: *const ::std::os::raw::c_char) -> u64;
1708    pub fn file_read(path: *const ::std::os::raw::c_char,
1709                     len: *mut usize)
1710                     -> *const ::std::os::raw::c_char;
1711    pub fn file_exists(path: *const ::std::os::raw::c_char) -> bool;
1712    pub fn file_buildpath(filename: *const ::std::os::raw::c_char,
1713                          dirpath: *const ::std::os::raw::c_char)
1714                          -> *const ::std::os::raw::c_char;
1715    pub fn file_write(path: *const ::std::os::raw::c_char,
1716                      buffer: *const ::std::os::raw::c_char,
1717                      len: usize)
1718                      -> bool;
1719    pub fn is_directory(path: *const ::std::os::raw::c_char) -> bool;
1720    pub fn directory_init(path: *const ::std::os::raw::c_char) -> *mut DIR;
1721    pub fn directory_read(ref_: *mut DIR) -> *const ::std::os::raw::c_char;
1722    pub fn string_nocasencmp(s1: *const ::std::os::raw::c_char,
1723                             s2: *const ::std::os::raw::c_char,
1724                             n: usize)
1725                             -> ::std::os::raw::c_int;
1726    pub fn string_casencmp(s1: *const ::std::os::raw::c_char,
1727                           s2: *const ::std::os::raw::c_char,
1728                           n: usize)
1729                           -> ::std::os::raw::c_int;
1730    pub fn string_cmp(s1: *const ::std::os::raw::c_char,
1731                      s2: *const ::std::os::raw::c_char)
1732                      -> ::std::os::raw::c_int;
1733    pub fn string_dup(s1: *const ::std::os::raw::c_char) -> *const ::std::os::raw::c_char;
1734    pub fn string_ndup(s1: *const ::std::os::raw::c_char,
1735                       n: usize)
1736                       -> *const ::std::os::raw::c_char;
1737    pub fn string_reverse(p: *mut ::std::os::raw::c_char);
1738    pub fn string_size(p: *const ::std::os::raw::c_char) -> u32;
1739    pub fn utf8_charbytes(s: *const ::std::os::raw::c_char, i: u32) -> u32;
1740    pub fn utf8_nbytes(n: u32) -> u32;
1741    pub fn utf8_encode(buffer: *mut ::std::os::raw::c_char, value: u32) -> u32;
1742    pub fn utf8_len(s: *const ::std::os::raw::c_char, nbytes: u32) -> u32;
1743    pub fn utf8_reverse(p: *mut ::std::os::raw::c_char) -> bool;
1744    pub fn power_of2_ceil(n: u32) -> u32;
1745    pub fn number_from_hex(s: *const ::std::os::raw::c_char, len: u32) -> i64;
1746    pub fn number_from_oct(s: *const ::std::os::raw::c_char, len: u32) -> i64;
1747    pub fn number_from_bin(s: *const ::std::os::raw::c_char, len: u32) -> i64;
1748    pub fn json_new() -> *mut json_t;
1749    pub fn json_begin_object(json: *mut json_t, key: *const ::std::os::raw::c_char);
1750    pub fn json_end_object(json: *mut json_t);
1751    pub fn json_begin_array(json: *mut json_t, key: *const ::std::os::raw::c_char);
1752    pub fn json_end_array(json: *mut json_t);
1753    pub fn json_add_cstring(json: *mut json_t,
1754                            key: *const ::std::os::raw::c_char,
1755                            value: *const ::std::os::raw::c_char);
1756    pub fn json_add_string(json: *mut json_t,
1757                           key: *const ::std::os::raw::c_char,
1758                           value: *const ::std::os::raw::c_char,
1759                           len: usize);
1760    pub fn json_add_int(json: *mut json_t, key: *const ::std::os::raw::c_char, value: i64);
1761    pub fn json_add_double(json: *mut json_t, key: *const ::std::os::raw::c_char, value: f64);
1762    pub fn json_add_bool(json: *mut json_t, key: *const ::std::os::raw::c_char, value: bool);
1763    pub fn json_add_null(json: *mut json_t, key: *const ::std::os::raw::c_char);
1764    pub fn json_free(json: *mut json_t);
1765    pub fn json_buffer(json: *mut json_t, len: *mut usize) -> *const ::std::os::raw::c_char;
1766    pub fn json_write_file(json: *mut json_t, path: *const ::std::os::raw::c_char) -> bool;
1767    pub fn json_pop(json: *mut json_t, n: u32);
1768    pub fn imaxabs(__n: intmax_t) -> intmax_t;
1769    pub fn imaxdiv(__numer: intmax_t, __denom: intmax_t) -> imaxdiv_t;
1770    pub fn strtoimax(__nptr: *const ::std::os::raw::c_char,
1771                     __endptr: *mut *mut ::std::os::raw::c_char,
1772                     __base: ::std::os::raw::c_int)
1773                     -> intmax_t;
1774    pub fn strtoumax(__nptr: *const ::std::os::raw::c_char,
1775                     __endptr: *mut *mut ::std::os::raw::c_char,
1776                     __base: ::std::os::raw::c_int)
1777                     -> uintmax_t;
1778    pub fn wcstoimax(__nptr: *const __gwchar_t,
1779                     __endptr: *mut *mut __gwchar_t,
1780                     __base: ::std::os::raw::c_int)
1781                     -> intmax_t;
1782    pub fn wcstoumax(__nptr: *const __gwchar_t,
1783                     __endptr: *mut *mut __gwchar_t,
1784                     __base: ::std::os::raw::c_int)
1785                     -> uintmax_t;
1786    #[link_name = "json_value_none"]
1787    pub static json_value_none: _json_value;
1788    pub fn json_parse(json: *const ::std::os::raw::c_char, length: usize) -> *mut json_value;
1789    pub fn json_parse_ex(settings: *mut json_settings,
1790                         json: *const ::std::os::raw::c_char,
1791                         length: usize,
1792                         error: *mut ::std::os::raw::c_char)
1793                         -> *mut json_value;
1794    pub fn json_value_free(arg1: *mut json_value);
1795    pub fn json_value_free_ex(settings: *mut json_settings, arg1: *mut json_value);
1796    #[link_name = "gravity_class_object"]
1797    pub static mut gravity_class_object: *mut gravity_class_t;
1798    #[link_name = "gravity_class_bool"]
1799    pub static mut gravity_class_bool: *mut gravity_class_t;
1800    #[link_name = "gravity_class_null"]
1801    pub static mut gravity_class_null: *mut gravity_class_t;
1802    #[link_name = "gravity_class_int"]
1803    pub static mut gravity_class_int: *mut gravity_class_t;
1804    #[link_name = "gravity_class_float"]
1805    pub static mut gravity_class_float: *mut gravity_class_t;
1806    #[link_name = "gravity_class_function"]
1807    pub static mut gravity_class_function: *mut gravity_class_t;
1808    #[link_name = "gravity_class_closure"]
1809    pub static mut gravity_class_closure: *mut gravity_class_t;
1810    #[link_name = "gravity_class_fiber"]
1811    pub static mut gravity_class_fiber: *mut gravity_class_t;
1812    #[link_name = "gravity_class_class"]
1813    pub static mut gravity_class_class: *mut gravity_class_t;
1814    #[link_name = "gravity_class_string"]
1815    pub static mut gravity_class_string: *mut gravity_class_t;
1816    #[link_name = "gravity_class_instance"]
1817    pub static mut gravity_class_instance: *mut gravity_class_t;
1818    #[link_name = "gravity_class_list"]
1819    pub static mut gravity_class_list: *mut gravity_class_t;
1820    #[link_name = "gravity_class_map"]
1821    pub static mut gravity_class_map: *mut gravity_class_t;
1822    #[link_name = "gravity_class_module"]
1823    pub static mut gravity_class_module: *mut gravity_class_t;
1824    #[link_name = "gravity_class_range"]
1825    pub static mut gravity_class_range: *mut gravity_class_t;
1826    #[link_name = "gravity_class_upvalue"]
1827    pub static mut gravity_class_upvalue: *mut gravity_class_t;
1828    pub fn gravity_module_new(vm: *mut gravity_vm,
1829                              identifier: *const ::std::os::raw::c_char)
1830                              -> *mut gravity_module_t;
1831    pub fn gravity_module_free(vm: *mut gravity_vm, m: *mut gravity_module_t);
1832    pub fn gravity_module_blacken(vm: *mut gravity_vm, m: *mut gravity_module_t);
1833    pub fn gravity_module_size(vm: *mut gravity_vm, m: *mut gravity_module_t) -> u32;
1834    pub fn gravity_function_new(vm: *mut gravity_vm,
1835                                identifier: *const ::std::os::raw::c_char,
1836                                nparams: u16,
1837                                nlocals: u16,
1838                                ntemps: u16,
1839                                code: *mut ::std::os::raw::c_void)
1840                                -> *mut gravity_function_t;
1841    pub fn gravity_function_new_internal(vm: *mut gravity_vm,
1842                                         identifier: *const ::std::os::raw::c_char,
1843                                         exec: gravity_c_internal,
1844                                         nparams: u16)
1845                                         -> *mut gravity_function_t;
1846    pub fn gravity_function_new_special(vm: *mut gravity_vm,
1847                                        identifier: *const ::std::os::raw::c_char,
1848                                        index: u16,
1849                                        getter: *mut ::std::os::raw::c_void,
1850                                        setter: *mut ::std::os::raw::c_void)
1851                                        -> *mut gravity_function_t;
1852    pub fn gravity_function_new_bridged(vm: *mut gravity_vm,
1853                                        identifier: *const ::std::os::raw::c_char,
1854                                        xdata: *mut ::std::os::raw::c_void)
1855                                        -> *mut gravity_function_t;
1856    pub fn gravity_function_cpool_add(vm: *mut gravity_vm,
1857                                      f: *mut gravity_function_t,
1858                                      v: gravity_value_t)
1859                                      -> u16;
1860    pub fn gravity_function_cpool_get(f: *mut gravity_function_t, i: u16) -> gravity_value_t;
1861    pub fn gravity_function_dump(f: *mut gravity_function_t, codef: code_dump_function);
1862    pub fn gravity_function_setouter(f: *mut gravity_function_t, outer: *mut gravity_object_t);
1863    pub fn gravity_function_setxdata(f: *mut gravity_function_t,
1864                                     xdata: *mut ::std::os::raw::c_void);
1865    pub fn gravity_function_serialize(f: *mut gravity_function_t, json: *mut json_t);
1866    pub fn gravity_bytecode_deserialize(buffer: *const ::std::os::raw::c_char,
1867                                        len: usize,
1868                                        ninst: *mut u32)
1869                                        -> *mut u32;
1870    pub fn gravity_function_deserialize(vm: *mut gravity_vm,
1871                                        json: *mut json_value)
1872                                        -> *mut gravity_function_t;
1873    pub fn gravity_function_free(vm: *mut gravity_vm, f: *mut gravity_function_t);
1874    pub fn gravity_function_blacken(vm: *mut gravity_vm, f: *mut gravity_function_t);
1875    pub fn gravity_function_size(vm: *mut gravity_vm, f: *mut gravity_function_t) -> u32;
1876    pub fn gravity_closure_new(vm: *mut gravity_vm,
1877                               f: *mut gravity_function_t)
1878                               -> *mut gravity_closure_t;
1879    pub fn gravity_closure_free(vm: *mut gravity_vm, closure: *mut gravity_closure_t);
1880    pub fn gravity_closure_size(vm: *mut gravity_vm, closure: *mut gravity_closure_t) -> u32;
1881    pub fn gravity_closure_blacken(vm: *mut gravity_vm, closure: *mut gravity_closure_t);
1882    pub fn gravity_upvalue_new(vm: *mut gravity_vm,
1883                               value: *mut gravity_value_t)
1884                               -> *mut gravity_upvalue_t;
1885    pub fn gravity_upvalue_size(vm: *mut gravity_vm, upvalue: *mut gravity_upvalue_t) -> u32;
1886    pub fn gravity_upvalue_blacken(vm: *mut gravity_vm, upvalue: *mut gravity_upvalue_t);
1887    pub fn gravity_upvalue_free(vm: *mut gravity_vm, upvalue: *mut gravity_upvalue_t);
1888    pub fn gravity_class_bind(c: *mut gravity_class_t,
1889                              key: *const ::std::os::raw::c_char,
1890                              value: gravity_value_t);
1891    pub fn gravity_class_getsuper(c: *mut gravity_class_t) -> *mut gravity_class_t;
1892    pub fn gravity_class_grow(c: *mut gravity_class_t, n: u32) -> bool;
1893    pub fn gravity_class_setsuper(subclass: *mut gravity_class_t,
1894                                  superclass: *mut gravity_class_t)
1895                                  -> bool;
1896    pub fn gravity_class_new_single(vm: *mut gravity_vm,
1897                                    identifier: *const ::std::os::raw::c_char,
1898                                    nfields: u32)
1899                                    -> *mut gravity_class_t;
1900    pub fn gravity_class_new_pair(vm: *mut gravity_vm,
1901                                  identifier: *const ::std::os::raw::c_char,
1902                                  superclass: *mut gravity_class_t,
1903                                  nivar: u32,
1904                                  nsvar: u32)
1905                                  -> *mut gravity_class_t;
1906    pub fn gravity_class_get_meta(c: *mut gravity_class_t) -> *mut gravity_class_t;
1907    pub fn gravity_class_is_meta(c: *mut gravity_class_t) -> bool;
1908    pub fn gravity_class_count_ivars(c: *mut gravity_class_t) -> u32;
1909    pub fn gravity_class_dump(c: *mut gravity_class_t);
1910    pub fn gravity_class_setxdata(c: *mut gravity_class_t, xdata: *mut ::std::os::raw::c_void);
1911    pub fn gravity_class_add_ivar(c: *mut gravity_class_t,
1912                                  identifier: *const ::std::os::raw::c_char)
1913                                  -> i16;
1914    pub fn gravity_class_serialize(c: *mut gravity_class_t, json: *mut json_t);
1915    pub fn gravity_class_deserialize(vm: *mut gravity_vm,
1916                                     json: *mut json_value)
1917                                     -> *mut gravity_class_t;
1918    pub fn gravity_class_free(vm: *mut gravity_vm, c: *mut gravity_class_t);
1919    pub fn gravity_class_free_core(vm: *mut gravity_vm, c: *mut gravity_class_t);
1920    pub fn gravity_class_lookup(c: *mut gravity_class_t,
1921                                key: gravity_value_t)
1922                                -> *mut gravity_object_t;
1923    pub fn gravity_class_lookup_closure(c: *mut gravity_class_t,
1924                                        key: gravity_value_t)
1925                                        -> *mut gravity_closure_t;
1926    pub fn gravity_class_lookup_constructor(c: *mut gravity_class_t,
1927                                            nparams: u32)
1928                                            -> *mut gravity_closure_t;
1929    pub fn gravity_class_blacken(vm: *mut gravity_vm, c: *mut gravity_class_t);
1930    pub fn gravity_class_size(vm: *mut gravity_vm, c: *mut gravity_class_t) -> u32;
1931    pub fn gravity_fiber_new(vm: *mut gravity_vm,
1932                             closure: *mut gravity_closure_t,
1933                             nstack: u32,
1934                             nframes: u32)
1935                             -> *mut gravity_fiber_t;
1936    pub fn gravity_fiber_reassign(fiber: *mut gravity_fiber_t,
1937                                  closure: *mut gravity_closure_t,
1938                                  nargs: u16);
1939    pub fn gravity_fiber_seterror(fiber: *mut gravity_fiber_t,
1940                                  error: *const ::std::os::raw::c_char);
1941    pub fn gravity_fiber_free(vm: *mut gravity_vm, fiber: *mut gravity_fiber_t);
1942    pub fn gravity_fiber_blacken(vm: *mut gravity_vm, fiber: *mut gravity_fiber_t);
1943    pub fn gravity_fiber_size(vm: *mut gravity_vm, fiber: *mut gravity_fiber_t) -> u32;
1944    pub fn gravity_instance_new(vm: *mut gravity_vm,
1945                                c: *mut gravity_class_t)
1946                                -> *mut gravity_instance_t;
1947    pub fn gravity_instance_dup(vm: *mut gravity_vm,
1948                                src: *mut gravity_instance_t)
1949                                -> *mut gravity_instance_t;
1950    pub fn gravity_instance_setivar(instance: *mut gravity_instance_t,
1951                                    idx: u32,
1952                                    value: gravity_value_t);
1953    pub fn gravity_instance_setxdata(i: *mut gravity_instance_t,
1954                                     xdata: *mut ::std::os::raw::c_void);
1955    pub fn gravity_instance_free(vm: *mut gravity_vm, i: *mut gravity_instance_t);
1956    pub fn gravity_instance_lookup_event(i: *mut gravity_instance_t,
1957                                         name: *const ::std::os::raw::c_char)
1958                                         -> *mut gravity_closure_t;
1959    pub fn gravity_instance_blacken(vm: *mut gravity_vm, i: *mut gravity_instance_t);
1960    pub fn gravity_instance_size(vm: *mut gravity_vm, i: *mut gravity_instance_t) -> u32;
1961    pub fn gravity_value_equals(v1: gravity_value_t, v2: gravity_value_t) -> bool;
1962    pub fn gravity_value_hash(value: gravity_value_t) -> u32;
1963    pub fn gravity_value_getclass(v: gravity_value_t) -> *mut gravity_class_t;
1964    pub fn gravity_value_getsuper(v: gravity_value_t) -> *mut gravity_class_t;
1965    pub fn gravity_value_free(vm: *mut gravity_vm, v: gravity_value_t);
1966    pub fn gravity_value_serialize(v: gravity_value_t, json: *mut json_t);
1967    pub fn gravity_value_dump(v: gravity_value_t, buffer: *mut ::std::os::raw::c_char, len: u16);
1968    pub fn gravity_value_isobject(v: gravity_value_t) -> bool;
1969    pub fn gravity_value_xdata(value: gravity_value_t) -> *mut ::std::os::raw::c_void;
1970    pub fn gravity_value_blacken(vm: *mut gravity_vm, v: gravity_value_t);
1971    pub fn gravity_value_size(vm: *mut gravity_vm, v: gravity_value_t) -> u32;
1972    pub fn gravity_object_serialize(obj: *mut gravity_object_t, json: *mut json_t);
1973    pub fn gravity_object_deserialize(vm: *mut gravity_vm,
1974                                      entry: *mut json_value)
1975                                      -> *mut gravity_object_t;
1976    pub fn gravity_object_free(vm: *mut gravity_vm, obj: *mut gravity_object_t);
1977    pub fn gravity_object_blacken(vm: *mut gravity_vm, obj: *mut gravity_object_t);
1978    pub fn gravity_object_size(vm: *mut gravity_vm, obj: *mut gravity_object_t) -> u32;
1979    pub fn gravity_object_debug(obj: *mut gravity_object_t) -> *const ::std::os::raw::c_char;
1980    pub fn gravity_list_new(vm: *mut gravity_vm, n: u32) -> *mut gravity_list_t;
1981    pub fn gravity_list_from_array(vm: *mut gravity_vm,
1982                                   n: u32,
1983                                   p: *mut gravity_value_t)
1984                                   -> *mut gravity_list_t;
1985    pub fn gravity_list_free(vm: *mut gravity_vm, list: *mut gravity_list_t);
1986    pub fn gravity_list_append_list(vm: *mut gravity_vm,
1987                                    list1: *mut gravity_list_t,
1988                                    list2: *mut gravity_list_t);
1989    pub fn gravity_list_blacken(vm: *mut gravity_vm, list: *mut gravity_list_t);
1990    pub fn gravity_list_size(vm: *mut gravity_vm, list: *mut gravity_list_t) -> u32;
1991    pub fn gravity_map_new(vm: *mut gravity_vm, n: u32) -> *mut gravity_map_t;
1992    pub fn gravity_map_free(vm: *mut gravity_vm, map: *mut gravity_map_t);
1993    pub fn gravity_map_append_map(vm: *mut gravity_vm,
1994                                  map1: *mut gravity_map_t,
1995                                  map2: *mut gravity_map_t);
1996    pub fn gravity_map_insert(vm: *mut gravity_vm,
1997                              map: *mut gravity_map_t,
1998                              key: gravity_value_t,
1999                              value: gravity_value_t);
2000    pub fn gravity_map_blacken(vm: *mut gravity_vm, map: *mut gravity_map_t);
2001    pub fn gravity_map_size(vm: *mut gravity_vm, map: *mut gravity_map_t) -> u32;
2002    pub fn gravity_range_new(vm: *mut gravity_vm,
2003                             from: gravity_int_t,
2004                             to: gravity_int_t,
2005                             inclusive: bool)
2006                             -> *mut gravity_range_t;
2007    pub fn gravity_range_free(vm: *mut gravity_vm, range: *mut gravity_range_t);
2008    pub fn gravity_range_blacken(vm: *mut gravity_vm, range: *mut gravity_range_t);
2009    pub fn gravity_range_size(vm: *mut gravity_vm, range: *mut gravity_range_t) -> u32;
2010    /// MARK: - STRING -
2011    pub fn gravity_string_to_value(vm: *mut gravity_vm,
2012                                   s: *const ::std::os::raw::c_char,
2013                                   len: u32)
2014                                   -> gravity_value_t;
2015    pub fn gravity_string_new(vm: *mut gravity_vm,
2016                              s: *mut ::std::os::raw::c_char,
2017                              len: u32,
2018                              alloc: u32)
2019                              -> *mut gravity_string_t;
2020    pub fn gravity_string_free(vm: *mut gravity_vm, value: *mut gravity_string_t);
2021    pub fn gravity_string_blacken(vm: *mut gravity_vm, string: *mut gravity_string_t);
2022    pub fn gravity_string_size(vm: *mut gravity_vm, string: *mut gravity_string_t) -> u32;
2023    pub fn gravity_hash_keyvaluefree(table: *mut gravity_hash_t,
2024                                     key: gravity_value_t,
2025                                     value: gravity_value_t,
2026                                     data: *mut ::std::os::raw::c_void);
2027    pub fn gravity_hash_keyfree(table: *mut gravity_hash_t,
2028                                key: gravity_value_t,
2029                                value: gravity_value_t,
2030                                data: *mut ::std::os::raw::c_void);
2031    pub fn gravity_hash_valuefree(table: *mut gravity_hash_t,
2032                                  key: gravity_value_t,
2033                                  value: gravity_value_t,
2034                                  data: *mut ::std::os::raw::c_void);
2035    pub fn token_string(token: gtoken_s, len: *mut u32) -> *const ::std::os::raw::c_char;
2036    pub fn token_name(token: gtoken_t) -> *const ::std::os::raw::c_char;
2037    pub fn token_keyword(buffer: *const ::std::os::raw::c_char, len: i32) -> gtoken_t;
2038    pub fn token_special_builtin(token: *mut gtoken_s) -> gtoken_t;
2039    pub fn token_keywords_indexes(idx_start: *mut u32, idx_end: *mut u32);
2040    pub fn token_literal_name(value: gliteral_t) -> *const ::std::os::raw::c_char;
2041    pub fn token_islabel_statement(token: gtoken_t) -> bool;
2042    pub fn token_isflow_statement(token: gtoken_t) -> bool;
2043    pub fn token_isloop_statement(token: gtoken_t) -> bool;
2044    pub fn token_isjump_statement(token: gtoken_t) -> bool;
2045    pub fn token_iscompound_statement(token: gtoken_t) -> bool;
2046    pub fn token_isdeclaration_statement(token: gtoken_t) -> bool;
2047    pub fn token_isempty_statement(token: gtoken_t) -> bool;
2048    pub fn token_isimport_statement(token: gtoken_t) -> bool;
2049    pub fn token_isspecial_statement(token: gtoken_t) -> bool;
2050    pub fn token_isoperator(token: gtoken_t) -> bool;
2051    pub fn token_ismacro(token: gtoken_t) -> bool;
2052    pub fn token_iserror(token: gtoken_t) -> bool;
2053    pub fn token_iseof(token: gtoken_t) -> bool;
2054    pub fn token_isidentifier(token: gtoken_t) -> bool;
2055    pub fn token_isvariable_declaration(token: gtoken_t) -> bool;
2056    pub fn token_isstatement(token: gtoken_t) -> bool;
2057    pub fn token_isassignment(token: gtoken_t) -> bool;
2058    pub fn token_isvariable_assignment(token: gtoken_t) -> bool;
2059    pub fn token_isaccess_specifier(token: gtoken_t) -> bool;
2060    pub fn token_isstorage_specifier(token: gtoken_t) -> bool;
2061    pub fn token_isprimary_expression(token: gtoken_t) -> bool;
2062    pub fn token_isexpression_statement(token: gtoken_t) -> bool;
2063    pub fn gnode_jump_stat_create(token: gtoken_s,
2064                                  expr: *mut gnode_t,
2065                                  decl: *mut gnode_t)
2066                                  -> *mut gnode_t;
2067    pub fn gnode_label_stat_create(token: gtoken_s,
2068                                   expr: *mut gnode_t,
2069                                   stmt: *mut gnode_t,
2070                                   decl: *mut gnode_t)
2071                                   -> *mut gnode_t;
2072    pub fn gnode_flow_stat_create(token: gtoken_s,
2073                                  cond: *mut gnode_t,
2074                                  stmt1: *mut gnode_t,
2075                                  stmt2: *mut gnode_t,
2076                                  decl: *mut gnode_t)
2077                                  -> *mut gnode_t;
2078    pub fn gnode_loop_stat_create(token: gtoken_s,
2079                                  cond: *mut gnode_t,
2080                                  stmt: *mut gnode_t,
2081                                  expr: *mut gnode_t,
2082                                  decl: *mut gnode_t)
2083                                  -> *mut gnode_t;
2084    pub fn gnode_block_stat_create(type_: gnode_n,
2085                                   token: gtoken_s,
2086                                   stmts: *mut gnode_r,
2087                                   decl: *mut gnode_t)
2088                                   -> *mut gnode_t;
2089    pub fn gnode_empty_stat_create(token: gtoken_s, decl: *mut gnode_t) -> *mut gnode_t;
2090    pub fn gnode_enum_decl_create(token: gtoken_s,
2091                                  identifier: *const ::std::os::raw::c_char,
2092                                  access_specifier: gtoken_t,
2093                                  storage_specifier: gtoken_t,
2094                                  symtable: *mut symboltable_t,
2095                                  meta: *mut ::std::os::raw::c_void,
2096                                  decl: *mut gnode_t)
2097                                  -> *mut gnode_t;
2098    pub fn gnode_class_decl_create(token: gtoken_s,
2099                                   identifier: *const ::std::os::raw::c_char,
2100                                   access_specifier: gtoken_t,
2101                                   storage_specifier: gtoken_t,
2102                                   superclass: *mut gnode_t,
2103                                   protocols: *mut gnode_r,
2104                                   declarations: *mut gnode_r,
2105                                   is_struct: bool,
2106                                   meta: *mut ::std::os::raw::c_void,
2107                                   decl: *mut gnode_t)
2108                                   -> *mut gnode_t;
2109    pub fn gnode_module_decl_create(token: gtoken_s,
2110                                    identifier: *const ::std::os::raw::c_char,
2111                                    access_specifier: gtoken_t,
2112                                    storage_specifier: gtoken_t,
2113                                    declarations: *mut gnode_r,
2114                                    meta: *mut ::std::os::raw::c_void,
2115                                    decl: *mut gnode_t)
2116                                    -> *mut gnode_t;
2117    pub fn gnode_variable_decl_create(token: gtoken_s,
2118                                      type_: gtoken_t,
2119                                      access_specifier: gtoken_t,
2120                                      storage_specifier: gtoken_t,
2121                                      declarations: *mut gnode_r,
2122                                      meta: *mut ::std::os::raw::c_void,
2123                                      decl: *mut gnode_t)
2124                                      -> *mut gnode_t;
2125    pub fn gnode_variable_create(token: gtoken_s,
2126                                 identifier: *const ::std::os::raw::c_char,
2127                                 annotation_type: *const ::std::os::raw::c_char,
2128                                 storage_specifier: gtoken_t,
2129                                 expr: *mut gnode_t,
2130                                 decl: *mut gnode_t)
2131                                 -> *mut gnode_t;
2132    pub fn gnode_function_decl_create(token: gtoken_s,
2133                                      identifier: *const ::std::os::raw::c_char,
2134                                      access_specifier: gtoken_t,
2135                                      storage_specifier: gtoken_t,
2136                                      params: *mut gnode_r,
2137                                      block: *mut gnode_compound_stmt_t,
2138                                      meta: *mut ::std::os::raw::c_void,
2139                                      decl: *mut gnode_t)
2140                                      -> *mut gnode_t;
2141    pub fn gnode_binary_expr_create(op: gtoken_t,
2142                                    left: *mut gnode_t,
2143                                    right: *mut gnode_t,
2144                                    decl: *mut gnode_t)
2145                                    -> *mut gnode_t;
2146    pub fn gnode_unary_expr_create(op: gtoken_t,
2147                                   expr: *mut gnode_t,
2148                                   decl: *mut gnode_t)
2149                                   -> *mut gnode_t;
2150    pub fn gnode_file_expr_create(token: gtoken_s,
2151                                  list: *mut cstring_r,
2152                                  decl: *mut gnode_t)
2153                                  -> *mut gnode_t;
2154    pub fn gnode_identifier_expr_create(token: gtoken_s,
2155                                        identifier: *const ::std::os::raw::c_char,
2156                                        identifier2: *const ::std::os::raw::c_char,
2157                                        decl: *mut gnode_t)
2158                                        -> *mut gnode_t;
2159    pub fn gnode_string_interpolation_create(token: gtoken_s,
2160                                             r: *mut gnode_r,
2161                                             decl: *mut gnode_t)
2162                                             -> *mut gnode_t;
2163    pub fn gnode_literal_string_expr_create(token: gtoken_s,
2164                                            s: *mut ::std::os::raw::c_char,
2165                                            len: u32,
2166                                            allocated: bool,
2167                                            decl: *mut gnode_t)
2168                                            -> *mut gnode_t;
2169    pub fn gnode_literal_float_expr_create(token: gtoken_s,
2170                                           f: f64,
2171                                           decl: *mut gnode_t)
2172                                           -> *mut gnode_t;
2173    pub fn gnode_literal_int_expr_create(token: gtoken_s,
2174                                         n: i64,
2175                                         decl: *mut gnode_t)
2176                                         -> *mut gnode_t;
2177    pub fn gnode_literal_bool_expr_create(token: gtoken_s,
2178                                          n: i32,
2179                                          decl: *mut gnode_t)
2180                                          -> *mut gnode_t;
2181    pub fn gnode_keyword_expr_create(token: gtoken_s, decl: *mut gnode_t) -> *mut gnode_t;
2182    pub fn gnode_postfix_subexpr_create(token: gtoken_s,
2183                                        type_: gnode_n,
2184                                        expr: *mut gnode_t,
2185                                        list: *mut gnode_r,
2186                                        decl: *mut gnode_t)
2187                                        -> *mut gnode_t;
2188    pub fn gnode_postfix_expr_create(token: gtoken_s,
2189                                     id: *mut gnode_t,
2190                                     list: *mut gnode_r,
2191                                     decl: *mut gnode_t)
2192                                     -> *mut gnode_t;
2193    pub fn gnode_list_expr_create(token: gtoken_s,
2194                                  list1: *mut gnode_r,
2195                                  list2: *mut gnode_r,
2196                                  ismap: bool,
2197                                  decl: *mut gnode_t)
2198                                  -> *mut gnode_t;
2199    pub fn gnode_duplicate(node: *mut gnode_t, deep: bool) -> *mut gnode_t;
2200    pub fn gnode_array_create() -> *mut gnode_r;
2201    pub fn gnode_array_remove_byindex(list: *mut gnode_r, index: usize) -> *mut gnode_r;
2202    pub fn gnode_function_add_upvalue(f: *mut gnode_function_decl_t,
2203                                      symbol: *mut gnode_var_t,
2204                                      n: u16)
2205                                      -> *mut gupvalue_t;
2206    pub fn cstring_array_create() -> *mut cstring_r;
2207    pub fn void_array_create() -> *mut void_r;
2208    pub fn gnode_array_sethead(list: *mut gnode_r, node: *mut gnode_t);
2209    pub fn gnode_is_equal(node1: *mut gnode_t, node2: *mut gnode_t) -> bool;
2210    pub fn gnode_is_expression(node: *mut gnode_t) -> bool;
2211    pub fn gnode_is_literal(node: *mut gnode_t) -> bool;
2212    pub fn gnode_is_literal_int(node: *mut gnode_t) -> bool;
2213    pub fn gnode_is_literal_number(node: *mut gnode_t) -> bool;
2214    pub fn gnode_is_literal_string(node: *mut gnode_t) -> bool;
2215    pub fn gnode_literal_dump(node: *mut gnode_literal_expr_t,
2216                              buffer: *mut ::std::os::raw::c_char,
2217                              buffersize: ::std::os::raw::c_int);
2218    pub fn gnode_free(node: *mut gnode_t);
2219    pub fn meta_from_node(node: *mut gnode_t) -> *mut ::std::os::raw::c_void;
2220    pub fn gravity_compiler_create(delegate: *mut gravity_delegate_t) -> *mut gravity_compiler_t;
2221    pub fn gravity_compiler_run(compiler: *mut gravity_compiler_t,
2222                                source: *const ::std::os::raw::c_char,
2223                                len: usize,
2224                                fileid: u32,
2225                                is_static: bool)
2226                                -> *mut gravity_closure_t;
2227    pub fn gravity_compiler_serialize(compiler: *mut gravity_compiler_t,
2228                                      closure: *mut gravity_closure_t)
2229                                      -> *mut json_t;
2230    pub fn gravity_compiler_serialize_infile(compiler: *mut gravity_compiler_t,
2231                                             closure: *mut gravity_closure_t,
2232                                             path: *const ::std::os::raw::c_char)
2233                                             -> bool;
2234    pub fn gravity_compiler_transfer(compiler: *mut gravity_compiler_t, vm: *mut gravity_vm);
2235    pub fn gravity_compiler_ast(compiler: *mut gravity_compiler_t) -> *mut gnode_t;
2236    pub fn gravity_compiler_free(compiler: *mut gravity_compiler_t);
2237    pub fn gravity_vm_new(delegate: *mut gravity_delegate_t) -> *mut gravity_vm;
2238    pub fn gravity_vm_newmini() -> *mut gravity_vm;
2239    pub fn gravity_vm_set_callbacks(vm: *mut gravity_vm,
2240                                    vm_transfer: vm_transfer_cb,
2241                                    vm_cleanup: vm_cleanup_cb);
2242    pub fn gravity_vm_free(vm: *mut gravity_vm);
2243    pub fn gravity_vm_reset(vm: *mut gravity_vm);
2244    pub fn gravity_vm_runclosure(vm: *mut gravity_vm,
2245                                 closure: *mut gravity_closure_t,
2246                                 selfvalue: gravity_value_t,
2247                                 params: *mut gravity_value_t,
2248                                 nparams: u16)
2249                                 -> bool;
2250    pub fn gravity_vm_runmain(vm: *mut gravity_vm, closure: *mut gravity_closure_t) -> bool;
2251    pub fn gravity_vm_loadclosure(vm: *mut gravity_vm, closure: *mut gravity_closure_t);
2252    pub fn gravity_vm_setvalue(vm: *mut gravity_vm,
2253                               key: *const ::std::os::raw::c_char,
2254                               value: gravity_value_t);
2255    pub fn gravity_vm_lookup(vm: *mut gravity_vm, key: gravity_value_t) -> gravity_value_t;
2256    pub fn gravity_vm_getvalue(vm: *mut gravity_vm,
2257                               key: *const ::std::os::raw::c_char,
2258                               keylen: u32)
2259                               -> gravity_value_t;
2260    pub fn gravity_vm_time(vm: *mut gravity_vm) -> f64;
2261    pub fn gravity_vm_result(vm: *mut gravity_vm) -> gravity_value_t;
2262    pub fn gravity_vm_delegate(vm: *mut gravity_vm) -> *mut gravity_delegate_t;
2263    pub fn gravity_vm_fiber(vm: *mut gravity_vm) -> *mut gravity_fiber_t;
2264    pub fn gravity_vm_setfiber(vm: *mut gravity_vm, fiber: *mut gravity_fiber_t);
2265    pub fn gravity_vm_seterror(vm: *mut gravity_vm, format: *const ::std::os::raw::c_char, ...);
2266    pub fn gravity_vm_seterror_string(vm: *mut gravity_vm, s: *const ::std::os::raw::c_char);
2267    pub fn gravity_vm_ismini(vm: *mut gravity_vm) -> bool;
2268    pub fn gravity_vm_keyindex(vm: *mut gravity_vm, index: u32) -> gravity_value_t;
2269    pub fn gravity_vm_isaborted(vm: *mut gravity_vm) -> bool;
2270    pub fn gravity_vm_setaborted(vm: *mut gravity_vm);
2271    pub fn gravity_vm_getclosure(vm: *mut gravity_vm) -> *mut gravity_closure_t;
2272    pub fn gravity_gray_value(vm: *mut gravity_vm, v: gravity_value_t);
2273    pub fn gravity_gray_object(vm: *mut gravity_vm, obj: *mut gravity_object_t);
2274    pub fn gravity_gc_start(vm: *mut gravity_vm);
2275    pub fn gravity_gc_setenabled(vm: *mut gravity_vm, enabled: bool);
2276    pub fn gravity_gc_push(vm: *mut gravity_vm, obj: *mut gravity_object_t);
2277    pub fn gravity_gc_pop(vm: *mut gravity_vm);
2278    pub fn gravity_vm_transfer(vm: *mut gravity_vm, obj: *mut gravity_object_t);
2279    pub fn gravity_vm_cleanup(vm: *mut gravity_vm);
2280    pub fn gravity_vm_filter(vm: *mut gravity_vm, cleanup_filter: vm_filter_cb);
2281    pub fn gravity_vm_loadfile(vm: *mut gravity_vm,
2282                               path: *const ::std::os::raw::c_char)
2283                               -> *mut gravity_closure_t;
2284    pub fn gravity_vm_loadbuffer(vm: *mut gravity_vm,
2285                                 buffer: *const ::std::os::raw::c_char,
2286                                 len: usize)
2287                                 -> *mut gravity_closure_t;
2288    pub fn gravity_vm_initmodule(vm: *mut gravity_vm, f: *mut gravity_function_t);
2289    pub fn gravity_vm_fastlookup(vm: *mut gravity_vm,
2290                                 c: *mut gravity_class_t,
2291                                 index: ::std::os::raw::c_int)
2292                                 -> *mut gravity_closure_t;
2293    pub fn gravity_vm_setslot(vm: *mut gravity_vm, value: gravity_value_t, index: u32);
2294    pub fn gravity_vm_getslot(vm: *mut gravity_vm, index: u32) -> gravity_value_t;
2295    pub fn gravity_vm_setdata(vm: *mut gravity_vm, data: *mut ::std::os::raw::c_void);
2296    pub fn gravity_vm_getdata(vm: *mut gravity_vm) -> *mut ::std::os::raw::c_void;
2297    pub fn gravity_vm_memupdate(vm: *mut gravity_vm, value: gravity_int_t);
2298    pub fn gravity_vm_get(vm: *mut gravity_vm,
2299                          key: *const ::std::os::raw::c_char)
2300                          -> gravity_value_t;
2301    pub fn gravity_vm_set(vm: *mut gravity_vm,
2302                          key: *const ::std::os::raw::c_char,
2303                          value: gravity_value_t)
2304                          -> bool;
2305    pub fn gravity_vm_anonymous(vm: *mut gravity_vm) -> *mut ::std::os::raw::c_char;
2306    pub fn gravity_core_register(vm: *mut gravity_vm);
2307    pub fn gravity_iscore_class(c: *mut gravity_class_t) -> bool;
2308    pub fn gravity_core_free();
2309    pub fn gravity_core_identifiers(id: *mut *mut *const ::std::os::raw::c_char) -> u32;
2310    pub fn gravity_core_class_from_name(name: *const ::std::os::raw::c_char)
2311                                        -> *mut gravity_class_t;
2312    pub fn convert_value2int(vm: *mut gravity_vm, v: gravity_value_t) -> gravity_value_t;
2313    pub fn convert_value2float(vm: *mut gravity_vm, v: gravity_value_t) -> gravity_value_t;
2314    pub fn convert_value2bool(vm: *mut gravity_vm, v: gravity_value_t) -> gravity_value_t;
2315    pub fn convert_value2string(vm: *mut gravity_vm, v: gravity_value_t) -> gravity_value_t;
2316}