1#![allow(non_upper_case_globals)]
2#![allow(non_camel_case_types)]
3#![allow(non_snake_case)]
4#[repr(C)]
7#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
8pub struct __BindgenBitfieldUnit<Storage, Align>
9where
10 Storage: AsRef<[u8]> + AsMut<[u8]>,
11{
12 storage: Storage,
13 align: [Align; 0],
14}
15
16impl<Storage, Align> __BindgenBitfieldUnit<Storage, Align>
17where
18 Storage: AsRef<[u8]> + AsMut<[u8]>,
19{
20 #[inline]
21 pub fn new(storage: Storage) -> Self {
22 Self { storage, align: [] }
23 }
24
25 #[inline]
26 pub fn get_bit(&self, index: usize) -> bool {
27 debug_assert!(index / 8 < self.storage.as_ref().len());
28
29 let byte_index = index / 8;
30 let byte = self.storage.as_ref()[byte_index];
31
32 let bit_index = index % 8;
33 let mask = 1 << bit_index;
34
35 byte & mask == mask
36 }
37
38 #[inline]
39 pub fn set_bit(&mut self, index: usize, val: bool) {
40 debug_assert!(index / 8 < self.storage.as_ref().len());
41
42 let byte_index = index / 8;
43 let byte = &mut self.storage.as_mut()[byte_index];
44
45 let bit_index = index % 8;
46 let mask = 1 << bit_index;
47
48 if val {
49 *byte |= mask;
50 } else {
51 *byte &= !mask;
52 }
53 }
54
55 #[inline]
56 pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
57 debug_assert!(bit_width <= 64);
58 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
59 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
60
61 let mut val = 0;
62
63 for i in 0..(bit_width as usize) {
64 if self.get_bit(i + bit_offset) {
65 val |= 1 << i;
66 }
67 }
68
69 val
70 }
71
72 #[inline]
73 pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
74 debug_assert!(bit_width <= 64);
75 debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
76 debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
77
78 for i in 0..(bit_width as usize) {
79 let mask = 1 << i;
80 let val_bit_is_set = val & mask == mask;
81 self.set_bit(i + bit_offset, val_bit_is_set);
82 }
83 }
84}
85#[repr(C)]
86#[derive(Debug, Copy, Clone)]
87pub struct __sigset_t {
88 pub __val: [usize; 16usize],
89}
90#[test]
91fn bindgen_test_layout___sigset_t() {
92 assert_eq!(
93 ::std::mem::size_of::<__sigset_t>(),
94 128usize,
95 concat!("Size of: ", stringify!(__sigset_t))
96 );
97 assert_eq!(
98 ::std::mem::align_of::<__sigset_t>(),
99 8usize,
100 concat!("Alignment of ", stringify!(__sigset_t))
101 );
102 assert_eq!(
103 unsafe { &(*(::std::ptr::null::<__sigset_t>())).__val as *const _ as usize },
104 0usize,
105 concat!(
106 "Offset of field: ",
107 stringify!(__sigset_t),
108 "::",
109 stringify!(__val)
110 )
111 );
112}
113pub type pthread_t = usize;
114#[repr(C)]
115#[derive(Debug, Copy, Clone)]
116pub struct __pthread_internal_list {
117 pub __prev: *mut __pthread_internal_list,
118 pub __next: *mut __pthread_internal_list,
119}
120#[test]
121fn bindgen_test_layout___pthread_internal_list() {
122 assert_eq!(
123 ::std::mem::size_of::<__pthread_internal_list>(),
124 16usize,
125 concat!("Size of: ", stringify!(__pthread_internal_list))
126 );
127 assert_eq!(
128 ::std::mem::align_of::<__pthread_internal_list>(),
129 8usize,
130 concat!("Alignment of ", stringify!(__pthread_internal_list))
131 );
132 assert_eq!(
133 unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__prev as *const _ as usize },
134 0usize,
135 concat!(
136 "Offset of field: ",
137 stringify!(__pthread_internal_list),
138 "::",
139 stringify!(__prev)
140 )
141 );
142 assert_eq!(
143 unsafe { &(*(::std::ptr::null::<__pthread_internal_list>())).__next as *const _ as usize },
144 8usize,
145 concat!(
146 "Offset of field: ",
147 stringify!(__pthread_internal_list),
148 "::",
149 stringify!(__next)
150 )
151 );
152}
153pub type __pthread_list_t = __pthread_internal_list;
154#[repr(C)]
155#[derive(Copy, Clone)]
156pub union pthread_mutex_t {
157 pub __data: pthread_mutex_t___pthread_mutex_s,
158 pub __size: [::std::os::raw::c_char; 40usize],
159 pub __align: ::std::os::raw::c_long,
160 _bindgen_union_align: [u64; 5usize],
161}
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct pthread_mutex_t___pthread_mutex_s {
165 pub __lock: ::std::os::raw::c_int,
166 pub __count: ::std::os::raw::c_uint,
167 pub __owner: ::std::os::raw::c_int,
168 pub __nusers: ::std::os::raw::c_uint,
169 pub __kind: ::std::os::raw::c_int,
170 pub __spins: ::std::os::raw::c_short,
171 pub __elision: ::std::os::raw::c_short,
172 pub __list: __pthread_list_t,
173}
174#[test]
175fn bindgen_test_layout_pthread_mutex_t___pthread_mutex_s() {
176 assert_eq!(
177 ::std::mem::size_of::<pthread_mutex_t___pthread_mutex_s>(),
178 40usize,
179 concat!("Size of: ", stringify!(pthread_mutex_t___pthread_mutex_s))
180 );
181 assert_eq!(
182 ::std::mem::align_of::<pthread_mutex_t___pthread_mutex_s>(),
183 8usize,
184 concat!(
185 "Alignment of ",
186 stringify!(pthread_mutex_t___pthread_mutex_s)
187 )
188 );
189 assert_eq!(
190 unsafe {
191 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__lock as *const _
192 as usize
193 },
194 0usize,
195 concat!(
196 "Offset of field: ",
197 stringify!(pthread_mutex_t___pthread_mutex_s),
198 "::",
199 stringify!(__lock)
200 )
201 );
202 assert_eq!(
203 unsafe {
204 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__count as *const _
205 as usize
206 },
207 4usize,
208 concat!(
209 "Offset of field: ",
210 stringify!(pthread_mutex_t___pthread_mutex_s),
211 "::",
212 stringify!(__count)
213 )
214 );
215 assert_eq!(
216 unsafe {
217 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__owner as *const _
218 as usize
219 },
220 8usize,
221 concat!(
222 "Offset of field: ",
223 stringify!(pthread_mutex_t___pthread_mutex_s),
224 "::",
225 stringify!(__owner)
226 )
227 );
228 assert_eq!(
229 unsafe {
230 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__nusers as *const _
231 as usize
232 },
233 12usize,
234 concat!(
235 "Offset of field: ",
236 stringify!(pthread_mutex_t___pthread_mutex_s),
237 "::",
238 stringify!(__nusers)
239 )
240 );
241 assert_eq!(
242 unsafe {
243 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__kind as *const _
244 as usize
245 },
246 16usize,
247 concat!(
248 "Offset of field: ",
249 stringify!(pthread_mutex_t___pthread_mutex_s),
250 "::",
251 stringify!(__kind)
252 )
253 );
254 assert_eq!(
255 unsafe {
256 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__spins as *const _
257 as usize
258 },
259 20usize,
260 concat!(
261 "Offset of field: ",
262 stringify!(pthread_mutex_t___pthread_mutex_s),
263 "::",
264 stringify!(__spins)
265 )
266 );
267 assert_eq!(
268 unsafe {
269 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__elision as *const _
270 as usize
271 },
272 22usize,
273 concat!(
274 "Offset of field: ",
275 stringify!(pthread_mutex_t___pthread_mutex_s),
276 "::",
277 stringify!(__elision)
278 )
279 );
280 assert_eq!(
281 unsafe {
282 &(*(::std::ptr::null::<pthread_mutex_t___pthread_mutex_s>())).__list as *const _
283 as usize
284 },
285 24usize,
286 concat!(
287 "Offset of field: ",
288 stringify!(pthread_mutex_t___pthread_mutex_s),
289 "::",
290 stringify!(__list)
291 )
292 );
293}
294#[test]
295fn bindgen_test_layout_pthread_mutex_t() {
296 assert_eq!(
297 ::std::mem::size_of::<pthread_mutex_t>(),
298 40usize,
299 concat!("Size of: ", stringify!(pthread_mutex_t))
300 );
301 assert_eq!(
302 ::std::mem::align_of::<pthread_mutex_t>(),
303 8usize,
304 concat!("Alignment of ", stringify!(pthread_mutex_t))
305 );
306 assert_eq!(
307 unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__data as *const _ as usize },
308 0usize,
309 concat!(
310 "Offset of field: ",
311 stringify!(pthread_mutex_t),
312 "::",
313 stringify!(__data)
314 )
315 );
316 assert_eq!(
317 unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__size as *const _ as usize },
318 0usize,
319 concat!(
320 "Offset of field: ",
321 stringify!(pthread_mutex_t),
322 "::",
323 stringify!(__size)
324 )
325 );
326 assert_eq!(
327 unsafe { &(*(::std::ptr::null::<pthread_mutex_t>())).__align as *const _ as usize },
328 0usize,
329 concat!(
330 "Offset of field: ",
331 stringify!(pthread_mutex_t),
332 "::",
333 stringify!(__align)
334 )
335 );
336}
337impl ::std::fmt::Debug for pthread_mutex_t {
338 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
339 write!(f, "pthread_mutex_t {{ union }}")
340 }
341}
342#[repr(C)]
343#[derive(Copy, Clone)]
344pub union pthread_cond_t {
345 pub __data: pthread_cond_t__bindgen_ty_1,
346 pub __size: [::std::os::raw::c_char; 48usize],
347 pub __align: ::std::os::raw::c_longlong,
348 _bindgen_union_align: [u64; 6usize],
349}
350#[repr(C)]
351#[derive(Debug, Copy, Clone)]
352pub struct pthread_cond_t__bindgen_ty_1 {
353 pub __lock: ::std::os::raw::c_int,
354 pub __futex: ::std::os::raw::c_uint,
355 pub __total_seq: ::std::os::raw::c_ulonglong,
356 pub __wakeup_seq: ::std::os::raw::c_ulonglong,
357 pub __woken_seq: ::std::os::raw::c_ulonglong,
358 pub __mutex: *mut ::std::os::raw::c_void,
359 pub __nwaiters: ::std::os::raw::c_uint,
360 pub __broadcast_seq: ::std::os::raw::c_uint,
361}
362#[test]
363fn bindgen_test_layout_pthread_cond_t__bindgen_ty_1() {
364 assert_eq!(
365 ::std::mem::size_of::<pthread_cond_t__bindgen_ty_1>(),
366 48usize,
367 concat!("Size of: ", stringify!(pthread_cond_t__bindgen_ty_1))
368 );
369 assert_eq!(
370 ::std::mem::align_of::<pthread_cond_t__bindgen_ty_1>(),
371 8usize,
372 concat!("Alignment of ", stringify!(pthread_cond_t__bindgen_ty_1))
373 );
374 assert_eq!(
375 unsafe {
376 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__lock as *const _ as usize
377 },
378 0usize,
379 concat!(
380 "Offset of field: ",
381 stringify!(pthread_cond_t__bindgen_ty_1),
382 "::",
383 stringify!(__lock)
384 )
385 );
386 assert_eq!(
387 unsafe {
388 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__futex as *const _ as usize
389 },
390 4usize,
391 concat!(
392 "Offset of field: ",
393 stringify!(pthread_cond_t__bindgen_ty_1),
394 "::",
395 stringify!(__futex)
396 )
397 );
398 assert_eq!(
399 unsafe {
400 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__total_seq as *const _
401 as usize
402 },
403 8usize,
404 concat!(
405 "Offset of field: ",
406 stringify!(pthread_cond_t__bindgen_ty_1),
407 "::",
408 stringify!(__total_seq)
409 )
410 );
411 assert_eq!(
412 unsafe {
413 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__wakeup_seq as *const _
414 as usize
415 },
416 16usize,
417 concat!(
418 "Offset of field: ",
419 stringify!(pthread_cond_t__bindgen_ty_1),
420 "::",
421 stringify!(__wakeup_seq)
422 )
423 );
424 assert_eq!(
425 unsafe {
426 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__woken_seq as *const _
427 as usize
428 },
429 24usize,
430 concat!(
431 "Offset of field: ",
432 stringify!(pthread_cond_t__bindgen_ty_1),
433 "::",
434 stringify!(__woken_seq)
435 )
436 );
437 assert_eq!(
438 unsafe {
439 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__mutex as *const _ as usize
440 },
441 32usize,
442 concat!(
443 "Offset of field: ",
444 stringify!(pthread_cond_t__bindgen_ty_1),
445 "::",
446 stringify!(__mutex)
447 )
448 );
449 assert_eq!(
450 unsafe {
451 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__nwaiters as *const _ as usize
452 },
453 40usize,
454 concat!(
455 "Offset of field: ",
456 stringify!(pthread_cond_t__bindgen_ty_1),
457 "::",
458 stringify!(__nwaiters)
459 )
460 );
461 assert_eq!(
462 unsafe {
463 &(*(::std::ptr::null::<pthread_cond_t__bindgen_ty_1>())).__broadcast_seq as *const _
464 as usize
465 },
466 44usize,
467 concat!(
468 "Offset of field: ",
469 stringify!(pthread_cond_t__bindgen_ty_1),
470 "::",
471 stringify!(__broadcast_seq)
472 )
473 );
474}
475#[test]
476fn bindgen_test_layout_pthread_cond_t() {
477 assert_eq!(
478 ::std::mem::size_of::<pthread_cond_t>(),
479 48usize,
480 concat!("Size of: ", stringify!(pthread_cond_t))
481 );
482 assert_eq!(
483 ::std::mem::align_of::<pthread_cond_t>(),
484 8usize,
485 concat!("Alignment of ", stringify!(pthread_cond_t))
486 );
487 assert_eq!(
488 unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__data as *const _ as usize },
489 0usize,
490 concat!(
491 "Offset of field: ",
492 stringify!(pthread_cond_t),
493 "::",
494 stringify!(__data)
495 )
496 );
497 assert_eq!(
498 unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__size as *const _ as usize },
499 0usize,
500 concat!(
501 "Offset of field: ",
502 stringify!(pthread_cond_t),
503 "::",
504 stringify!(__size)
505 )
506 );
507 assert_eq!(
508 unsafe { &(*(::std::ptr::null::<pthread_cond_t>())).__align as *const _ as usize },
509 0usize,
510 concat!(
511 "Offset of field: ",
512 stringify!(pthread_cond_t),
513 "::",
514 stringify!(__align)
515 )
516 );
517}
518impl ::std::fmt::Debug for pthread_cond_t {
519 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
520 write!(f, "pthread_cond_t {{ union }}")
521 }
522}
523pub type VALUE = usize;
524pub type ID = usize;
525#[repr(C)]
526#[derive(Debug, Copy, Clone)]
527pub struct RBasic {
528 pub flags: VALUE,
529 pub klass: VALUE,
530}
531#[test]
532fn bindgen_test_layout_RBasic() {
533 assert_eq!(
534 ::std::mem::size_of::<RBasic>(),
535 16usize,
536 concat!("Size of: ", stringify!(RBasic))
537 );
538 assert_eq!(
539 ::std::mem::align_of::<RBasic>(),
540 8usize,
541 concat!("Alignment of ", stringify!(RBasic))
542 );
543 assert_eq!(
544 unsafe { &(*(::std::ptr::null::<RBasic>())).flags as *const _ as usize },
545 0usize,
546 concat!(
547 "Offset of field: ",
548 stringify!(RBasic),
549 "::",
550 stringify!(flags)
551 )
552 );
553 assert_eq!(
554 unsafe { &(*(::std::ptr::null::<RBasic>())).klass as *const _ as usize },
555 8usize,
556 concat!(
557 "Offset of field: ",
558 stringify!(RBasic),
559 "::",
560 stringify!(klass)
561 )
562 );
563}
564#[repr(C)]
565#[derive(Copy, Clone)]
566pub struct RString {
567 pub basic: RBasic,
568 pub as_: RString__bindgen_ty_1,
569}
570#[repr(C)]
571#[derive(Copy, Clone)]
572pub union RString__bindgen_ty_1 {
573 pub heap: RString__bindgen_ty_1__bindgen_ty_1,
574 pub ary: [::std::os::raw::c_char; 24usize],
575 _bindgen_union_align: [u64; 3usize],
576}
577#[repr(C)]
578#[derive(Copy, Clone)]
579pub struct RString__bindgen_ty_1__bindgen_ty_1 {
580 pub len: ::std::os::raw::c_long,
581 pub ptr: *mut ::std::os::raw::c_char,
582 pub aux: RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
583}
584#[repr(C)]
585#[derive(Copy, Clone)]
586pub union RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
587 pub capa: ::std::os::raw::c_long,
588 pub shared: VALUE,
589 _bindgen_union_align: u64,
590}
591#[test]
592fn bindgen_test_layout_RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
593 assert_eq!(
594 ::std::mem::size_of::<RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
595 8usize,
596 concat!(
597 "Size of: ",
598 stringify!(RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
599 )
600 );
601 assert_eq!(
602 ::std::mem::align_of::<RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
603 8usize,
604 concat!(
605 "Alignment of ",
606 stringify!(RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
607 )
608 );
609 assert_eq!(
610 unsafe {
611 &(*(::std::ptr::null::<RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).capa
612 as *const _ as usize
613 },
614 0usize,
615 concat!(
616 "Offset of field: ",
617 stringify!(RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
618 "::",
619 stringify!(capa)
620 )
621 );
622 assert_eq!(
623 unsafe {
624 &(*(::std::ptr::null::<RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).shared
625 as *const _ as usize
626 },
627 0usize,
628 concat!(
629 "Offset of field: ",
630 stringify!(RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
631 "::",
632 stringify!(shared)
633 )
634 );
635}
636impl ::std::fmt::Debug for RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
637 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
638 write!(
639 f,
640 "RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {{ union }}"
641 )
642 }
643}
644#[test]
645fn bindgen_test_layout_RString__bindgen_ty_1__bindgen_ty_1() {
646 assert_eq!(
647 ::std::mem::size_of::<RString__bindgen_ty_1__bindgen_ty_1>(),
648 24usize,
649 concat!("Size of: ", stringify!(RString__bindgen_ty_1__bindgen_ty_1))
650 );
651 assert_eq!(
652 ::std::mem::align_of::<RString__bindgen_ty_1__bindgen_ty_1>(),
653 8usize,
654 concat!(
655 "Alignment of ",
656 stringify!(RString__bindgen_ty_1__bindgen_ty_1)
657 )
658 );
659 assert_eq!(
660 unsafe {
661 &(*(::std::ptr::null::<RString__bindgen_ty_1__bindgen_ty_1>())).len as *const _ as usize
662 },
663 0usize,
664 concat!(
665 "Offset of field: ",
666 stringify!(RString__bindgen_ty_1__bindgen_ty_1),
667 "::",
668 stringify!(len)
669 )
670 );
671 assert_eq!(
672 unsafe {
673 &(*(::std::ptr::null::<RString__bindgen_ty_1__bindgen_ty_1>())).ptr as *const _ as usize
674 },
675 8usize,
676 concat!(
677 "Offset of field: ",
678 stringify!(RString__bindgen_ty_1__bindgen_ty_1),
679 "::",
680 stringify!(ptr)
681 )
682 );
683 assert_eq!(
684 unsafe {
685 &(*(::std::ptr::null::<RString__bindgen_ty_1__bindgen_ty_1>())).aux as *const _ as usize
686 },
687 16usize,
688 concat!(
689 "Offset of field: ",
690 stringify!(RString__bindgen_ty_1__bindgen_ty_1),
691 "::",
692 stringify!(aux)
693 )
694 );
695}
696impl ::std::fmt::Debug for RString__bindgen_ty_1__bindgen_ty_1 {
697 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
698 write!(
699 f,
700 "RString__bindgen_ty_1__bindgen_ty_1 {{ len: {:?}, ptr: {:?}, aux: {:?} }}",
701 self.len, self.ptr, self.aux
702 )
703 }
704}
705#[test]
706fn bindgen_test_layout_RString__bindgen_ty_1() {
707 assert_eq!(
708 ::std::mem::size_of::<RString__bindgen_ty_1>(),
709 24usize,
710 concat!("Size of: ", stringify!(RString__bindgen_ty_1))
711 );
712 assert_eq!(
713 ::std::mem::align_of::<RString__bindgen_ty_1>(),
714 8usize,
715 concat!("Alignment of ", stringify!(RString__bindgen_ty_1))
716 );
717 assert_eq!(
718 unsafe { &(*(::std::ptr::null::<RString__bindgen_ty_1>())).heap as *const _ as usize },
719 0usize,
720 concat!(
721 "Offset of field: ",
722 stringify!(RString__bindgen_ty_1),
723 "::",
724 stringify!(heap)
725 )
726 );
727 assert_eq!(
728 unsafe { &(*(::std::ptr::null::<RString__bindgen_ty_1>())).ary as *const _ as usize },
729 0usize,
730 concat!(
731 "Offset of field: ",
732 stringify!(RString__bindgen_ty_1),
733 "::",
734 stringify!(ary)
735 )
736 );
737}
738impl ::std::fmt::Debug for RString__bindgen_ty_1 {
739 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
740 write!(f, "RString__bindgen_ty_1 {{ union }}")
741 }
742}
743#[test]
744fn bindgen_test_layout_RString() {
745 assert_eq!(
746 ::std::mem::size_of::<RString>(),
747 40usize,
748 concat!("Size of: ", stringify!(RString))
749 );
750 assert_eq!(
751 ::std::mem::align_of::<RString>(),
752 8usize,
753 concat!("Alignment of ", stringify!(RString))
754 );
755 assert_eq!(
756 unsafe { &(*(::std::ptr::null::<RString>())).basic as *const _ as usize },
757 0usize,
758 concat!(
759 "Offset of field: ",
760 stringify!(RString),
761 "::",
762 stringify!(basic)
763 )
764 );
765 assert_eq!(
766 unsafe { &(*(::std::ptr::null::<RString>())).as_ as *const _ as usize },
767 16usize,
768 concat!(
769 "Offset of field: ",
770 stringify!(RString),
771 "::",
772 stringify!(as_)
773 )
774 );
775}
776impl ::std::fmt::Debug for RString {
777 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
778 write!(
779 f,
780 "RString {{ basic: {:?}, as: {:?} }}",
781 self.basic, self.as_
782 )
783 }
784}
785#[repr(C)]
786#[derive(Copy, Clone)]
787pub struct RArray {
788 pub basic: RBasic,
789 pub as_: RArray__bindgen_ty_1,
790}
791#[repr(C)]
792#[derive(Copy, Clone)]
793pub union RArray__bindgen_ty_1 {
794 pub heap: RArray__bindgen_ty_1__bindgen_ty_1,
795 pub ary: [VALUE; 3usize],
796 _bindgen_union_align: [u64; 3usize],
797}
798#[repr(C)]
799#[derive(Copy, Clone)]
800pub struct RArray__bindgen_ty_1__bindgen_ty_1 {
801 pub len: ::std::os::raw::c_long,
802 pub aux: RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
803 pub ptr: *mut VALUE,
804}
805#[repr(C)]
806#[derive(Copy, Clone)]
807pub union RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
808 pub capa: ::std::os::raw::c_long,
809 pub shared: VALUE,
810 _bindgen_union_align: u64,
811}
812#[test]
813fn bindgen_test_layout_RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1() {
814 assert_eq!(
815 ::std::mem::size_of::<RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
816 8usize,
817 concat!(
818 "Size of: ",
819 stringify!(RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
820 )
821 );
822 assert_eq!(
823 ::std::mem::align_of::<RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>(),
824 8usize,
825 concat!(
826 "Alignment of ",
827 stringify!(RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1)
828 )
829 );
830 assert_eq!(
831 unsafe {
832 &(*(::std::ptr::null::<RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).capa
833 as *const _ as usize
834 },
835 0usize,
836 concat!(
837 "Offset of field: ",
838 stringify!(RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
839 "::",
840 stringify!(capa)
841 )
842 );
843 assert_eq!(
844 unsafe {
845 &(*(::std::ptr::null::<RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1>())).shared
846 as *const _ as usize
847 },
848 0usize,
849 concat!(
850 "Offset of field: ",
851 stringify!(RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1),
852 "::",
853 stringify!(shared)
854 )
855 );
856}
857impl ::std::fmt::Debug for RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
858 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
859 write!(
860 f,
861 "RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {{ union }}"
862 )
863 }
864}
865#[test]
866fn bindgen_test_layout_RArray__bindgen_ty_1__bindgen_ty_1() {
867 assert_eq!(
868 ::std::mem::size_of::<RArray__bindgen_ty_1__bindgen_ty_1>(),
869 24usize,
870 concat!("Size of: ", stringify!(RArray__bindgen_ty_1__bindgen_ty_1))
871 );
872 assert_eq!(
873 ::std::mem::align_of::<RArray__bindgen_ty_1__bindgen_ty_1>(),
874 8usize,
875 concat!(
876 "Alignment of ",
877 stringify!(RArray__bindgen_ty_1__bindgen_ty_1)
878 )
879 );
880 assert_eq!(
881 unsafe {
882 &(*(::std::ptr::null::<RArray__bindgen_ty_1__bindgen_ty_1>())).len as *const _ as usize
883 },
884 0usize,
885 concat!(
886 "Offset of field: ",
887 stringify!(RArray__bindgen_ty_1__bindgen_ty_1),
888 "::",
889 stringify!(len)
890 )
891 );
892 assert_eq!(
893 unsafe {
894 &(*(::std::ptr::null::<RArray__bindgen_ty_1__bindgen_ty_1>())).aux as *const _ as usize
895 },
896 8usize,
897 concat!(
898 "Offset of field: ",
899 stringify!(RArray__bindgen_ty_1__bindgen_ty_1),
900 "::",
901 stringify!(aux)
902 )
903 );
904 assert_eq!(
905 unsafe {
906 &(*(::std::ptr::null::<RArray__bindgen_ty_1__bindgen_ty_1>())).ptr as *const _ as usize
907 },
908 16usize,
909 concat!(
910 "Offset of field: ",
911 stringify!(RArray__bindgen_ty_1__bindgen_ty_1),
912 "::",
913 stringify!(ptr)
914 )
915 );
916}
917impl ::std::fmt::Debug for RArray__bindgen_ty_1__bindgen_ty_1 {
918 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
919 write!(
920 f,
921 "RArray__bindgen_ty_1__bindgen_ty_1 {{ len: {:?}, aux: {:?}, ptr: {:?} }}",
922 self.len, self.aux, self.ptr
923 )
924 }
925}
926#[test]
927fn bindgen_test_layout_RArray__bindgen_ty_1() {
928 assert_eq!(
929 ::std::mem::size_of::<RArray__bindgen_ty_1>(),
930 24usize,
931 concat!("Size of: ", stringify!(RArray__bindgen_ty_1))
932 );
933 assert_eq!(
934 ::std::mem::align_of::<RArray__bindgen_ty_1>(),
935 8usize,
936 concat!("Alignment of ", stringify!(RArray__bindgen_ty_1))
937 );
938 assert_eq!(
939 unsafe { &(*(::std::ptr::null::<RArray__bindgen_ty_1>())).heap as *const _ as usize },
940 0usize,
941 concat!(
942 "Offset of field: ",
943 stringify!(RArray__bindgen_ty_1),
944 "::",
945 stringify!(heap)
946 )
947 );
948 assert_eq!(
949 unsafe { &(*(::std::ptr::null::<RArray__bindgen_ty_1>())).ary as *const _ as usize },
950 0usize,
951 concat!(
952 "Offset of field: ",
953 stringify!(RArray__bindgen_ty_1),
954 "::",
955 stringify!(ary)
956 )
957 );
958}
959impl ::std::fmt::Debug for RArray__bindgen_ty_1 {
960 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
961 write!(f, "RArray__bindgen_ty_1 {{ union }}")
962 }
963}
964#[test]
965fn bindgen_test_layout_RArray() {
966 assert_eq!(
967 ::std::mem::size_of::<RArray>(),
968 40usize,
969 concat!("Size of: ", stringify!(RArray))
970 );
971 assert_eq!(
972 ::std::mem::align_of::<RArray>(),
973 8usize,
974 concat!("Alignment of ", stringify!(RArray))
975 );
976 assert_eq!(
977 unsafe { &(*(::std::ptr::null::<RArray>())).basic as *const _ as usize },
978 0usize,
979 concat!(
980 "Offset of field: ",
981 stringify!(RArray),
982 "::",
983 stringify!(basic)
984 )
985 );
986 assert_eq!(
987 unsafe { &(*(::std::ptr::null::<RArray>())).as_ as *const _ as usize },
988 16usize,
989 concat!(
990 "Offset of field: ",
991 stringify!(RArray),
992 "::",
993 stringify!(as_)
994 )
995 );
996}
997impl ::std::fmt::Debug for RArray {
998 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
999 write!(
1000 f,
1001 "RArray {{ basic: {:?}, as: {:?} }}",
1002 self.basic, self.as_
1003 )
1004 }
1005}
1006#[repr(C)]
1007#[derive(Debug, Copy, Clone)]
1008pub struct rb_global_variable {
1009 _unused: [u8; 0],
1010}
1011pub type st_data_t = usize;
1012pub type st_index_t = st_data_t;
1013#[repr(C)]
1014#[derive(Debug, Copy, Clone)]
1015pub struct st_hash_type {
1016 pub compare: ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>,
1017 pub hash: ::std::option::Option<unsafe extern "C" fn() -> st_index_t>,
1018}
1019#[test]
1020fn bindgen_test_layout_st_hash_type() {
1021 assert_eq!(
1022 ::std::mem::size_of::<st_hash_type>(),
1023 16usize,
1024 concat!("Size of: ", stringify!(st_hash_type))
1025 );
1026 assert_eq!(
1027 ::std::mem::align_of::<st_hash_type>(),
1028 8usize,
1029 concat!("Alignment of ", stringify!(st_hash_type))
1030 );
1031 assert_eq!(
1032 unsafe { &(*(::std::ptr::null::<st_hash_type>())).compare as *const _ as usize },
1033 0usize,
1034 concat!(
1035 "Offset of field: ",
1036 stringify!(st_hash_type),
1037 "::",
1038 stringify!(compare)
1039 )
1040 );
1041 assert_eq!(
1042 unsafe { &(*(::std::ptr::null::<st_hash_type>())).hash as *const _ as usize },
1043 8usize,
1044 concat!(
1045 "Offset of field: ",
1046 stringify!(st_hash_type),
1047 "::",
1048 stringify!(hash)
1049 )
1050 );
1051}
1052#[repr(C)]
1053#[derive(Debug, Copy, Clone)]
1054pub struct st_table {
1055 pub type_: *const st_hash_type,
1056 pub num_bins: st_index_t,
1057 pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize], u64>,
1058 pub bins: *mut *mut st_table_entry,
1059 pub head: *mut st_table_entry,
1060 pub tail: *mut st_table_entry,
1061}
1062#[test]
1063fn bindgen_test_layout_st_table() {
1064 assert_eq!(
1065 ::std::mem::size_of::<st_table>(),
1066 48usize,
1067 concat!("Size of: ", stringify!(st_table))
1068 );
1069 assert_eq!(
1070 ::std::mem::align_of::<st_table>(),
1071 8usize,
1072 concat!("Alignment of ", stringify!(st_table))
1073 );
1074 assert_eq!(
1075 unsafe { &(*(::std::ptr::null::<st_table>())).type_ as *const _ as usize },
1076 0usize,
1077 concat!(
1078 "Offset of field: ",
1079 stringify!(st_table),
1080 "::",
1081 stringify!(type_)
1082 )
1083 );
1084 assert_eq!(
1085 unsafe { &(*(::std::ptr::null::<st_table>())).num_bins as *const _ as usize },
1086 8usize,
1087 concat!(
1088 "Offset of field: ",
1089 stringify!(st_table),
1090 "::",
1091 stringify!(num_bins)
1092 )
1093 );
1094 assert_eq!(
1095 unsafe { &(*(::std::ptr::null::<st_table>())).bins as *const _ as usize },
1096 24usize,
1097 concat!(
1098 "Offset of field: ",
1099 stringify!(st_table),
1100 "::",
1101 stringify!(bins)
1102 )
1103 );
1104 assert_eq!(
1105 unsafe { &(*(::std::ptr::null::<st_table>())).head as *const _ as usize },
1106 32usize,
1107 concat!(
1108 "Offset of field: ",
1109 stringify!(st_table),
1110 "::",
1111 stringify!(head)
1112 )
1113 );
1114 assert_eq!(
1115 unsafe { &(*(::std::ptr::null::<st_table>())).tail as *const _ as usize },
1116 40usize,
1117 concat!(
1118 "Offset of field: ",
1119 stringify!(st_table),
1120 "::",
1121 stringify!(tail)
1122 )
1123 );
1124}
1125impl st_table {
1126 #[inline]
1127 pub fn entries_packed(&self) -> ::std::os::raw::c_uint {
1128 unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
1129 }
1130 #[inline]
1131 pub fn set_entries_packed(&mut self, val: ::std::os::raw::c_uint) {
1132 unsafe {
1133 let val: u32 = ::std::mem::transmute(val);
1134 self._bitfield_1.set(0usize, 1u8, val as u64)
1135 }
1136 }
1137 #[inline]
1138 pub fn num_entries(&self) -> st_index_t {
1139 unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as usize) }
1140 }
1141 #[inline]
1142 pub fn set_num_entries(&mut self, val: st_index_t) {
1143 unsafe {
1144 let val: usize = ::std::mem::transmute(val);
1145 self._bitfield_1.set(1usize, 63u8, val as u64)
1146 }
1147 }
1148 #[inline]
1149 pub fn new_bitfield_1(
1150 entries_packed: ::std::os::raw::c_uint,
1151 num_entries: st_index_t,
1152 ) -> __BindgenBitfieldUnit<[u8; 8usize], u64> {
1153 let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize], u64> =
1154 Default::default();
1155 __bindgen_bitfield_unit.set(0usize, 1u8, {
1156 let entries_packed: u32 = unsafe { ::std::mem::transmute(entries_packed) };
1157 entries_packed as u64
1158 });
1159 __bindgen_bitfield_unit.set(1usize, 63u8, {
1160 let num_entries: usize = unsafe { ::std::mem::transmute(num_entries) };
1161 num_entries as u64
1162 });
1163 __bindgen_bitfield_unit
1164 }
1165}
1166pub type rb_unblock_function_t =
1167 ::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
1168pub type rb_event_flag_t = ::std::os::raw::c_uint;
1169pub type rb_event_hook_func_t = ::std::option::Option<
1170 unsafe extern "C" fn(arg1: rb_event_flag_t, data: VALUE, arg2: VALUE, arg3: ID, klass: VALUE),
1171>;
1172#[repr(C)]
1173#[derive(Debug, Copy, Clone)]
1174pub struct rb_event_hook_struct {
1175 pub flag: rb_event_flag_t,
1176 pub func: rb_event_hook_func_t,
1177 pub data: VALUE,
1178 pub next: *mut rb_event_hook_struct,
1179}
1180#[test]
1181fn bindgen_test_layout_rb_event_hook_struct() {
1182 assert_eq!(
1183 ::std::mem::size_of::<rb_event_hook_struct>(),
1184 32usize,
1185 concat!("Size of: ", stringify!(rb_event_hook_struct))
1186 );
1187 assert_eq!(
1188 ::std::mem::align_of::<rb_event_hook_struct>(),
1189 8usize,
1190 concat!("Alignment of ", stringify!(rb_event_hook_struct))
1191 );
1192 assert_eq!(
1193 unsafe { &(*(::std::ptr::null::<rb_event_hook_struct>())).flag as *const _ as usize },
1194 0usize,
1195 concat!(
1196 "Offset of field: ",
1197 stringify!(rb_event_hook_struct),
1198 "::",
1199 stringify!(flag)
1200 )
1201 );
1202 assert_eq!(
1203 unsafe { &(*(::std::ptr::null::<rb_event_hook_struct>())).func as *const _ as usize },
1204 8usize,
1205 concat!(
1206 "Offset of field: ",
1207 stringify!(rb_event_hook_struct),
1208 "::",
1209 stringify!(func)
1210 )
1211 );
1212 assert_eq!(
1213 unsafe { &(*(::std::ptr::null::<rb_event_hook_struct>())).data as *const _ as usize },
1214 16usize,
1215 concat!(
1216 "Offset of field: ",
1217 stringify!(rb_event_hook_struct),
1218 "::",
1219 stringify!(data)
1220 )
1221 );
1222 assert_eq!(
1223 unsafe { &(*(::std::ptr::null::<rb_event_hook_struct>())).next as *const _ as usize },
1224 24usize,
1225 concat!(
1226 "Offset of field: ",
1227 stringify!(rb_event_hook_struct),
1228 "::",
1229 stringify!(next)
1230 )
1231 );
1232}
1233pub type rb_event_hook_t = rb_event_hook_struct;
1234#[repr(C)]
1235#[derive(Copy, Clone)]
1236pub struct RNode {
1237 pub flags: ::std::os::raw::c_ulong,
1238 pub nd_file: *mut ::std::os::raw::c_char,
1239 pub u1: RNode__bindgen_ty_1,
1240 pub u2: RNode__bindgen_ty_2,
1241 pub u3: RNode__bindgen_ty_3,
1242}
1243#[repr(C)]
1244#[derive(Copy, Clone)]
1245pub union RNode__bindgen_ty_1 {
1246 pub node: *mut RNode,
1247 pub id: ID,
1248 pub value: VALUE,
1249 pub cfunc: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
1250 pub tbl: *mut ID,
1251 _bindgen_union_align: u64,
1252}
1253#[test]
1254fn bindgen_test_layout_RNode__bindgen_ty_1() {
1255 assert_eq!(
1256 ::std::mem::size_of::<RNode__bindgen_ty_1>(),
1257 8usize,
1258 concat!("Size of: ", stringify!(RNode__bindgen_ty_1))
1259 );
1260 assert_eq!(
1261 ::std::mem::align_of::<RNode__bindgen_ty_1>(),
1262 8usize,
1263 concat!("Alignment of ", stringify!(RNode__bindgen_ty_1))
1264 );
1265 assert_eq!(
1266 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_1>())).node as *const _ as usize },
1267 0usize,
1268 concat!(
1269 "Offset of field: ",
1270 stringify!(RNode__bindgen_ty_1),
1271 "::",
1272 stringify!(node)
1273 )
1274 );
1275 assert_eq!(
1276 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_1>())).id as *const _ as usize },
1277 0usize,
1278 concat!(
1279 "Offset of field: ",
1280 stringify!(RNode__bindgen_ty_1),
1281 "::",
1282 stringify!(id)
1283 )
1284 );
1285 assert_eq!(
1286 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_1>())).value as *const _ as usize },
1287 0usize,
1288 concat!(
1289 "Offset of field: ",
1290 stringify!(RNode__bindgen_ty_1),
1291 "::",
1292 stringify!(value)
1293 )
1294 );
1295 assert_eq!(
1296 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_1>())).cfunc as *const _ as usize },
1297 0usize,
1298 concat!(
1299 "Offset of field: ",
1300 stringify!(RNode__bindgen_ty_1),
1301 "::",
1302 stringify!(cfunc)
1303 )
1304 );
1305 assert_eq!(
1306 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_1>())).tbl as *const _ as usize },
1307 0usize,
1308 concat!(
1309 "Offset of field: ",
1310 stringify!(RNode__bindgen_ty_1),
1311 "::",
1312 stringify!(tbl)
1313 )
1314 );
1315}
1316impl ::std::fmt::Debug for RNode__bindgen_ty_1 {
1317 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1318 write!(f, "RNode__bindgen_ty_1 {{ union }}")
1319 }
1320}
1321#[repr(C)]
1322#[derive(Copy, Clone)]
1323pub union RNode__bindgen_ty_2 {
1324 pub node: *mut RNode,
1325 pub id: ID,
1326 pub argc: ::std::os::raw::c_long,
1327 pub value: VALUE,
1328 _bindgen_union_align: u64,
1329}
1330#[test]
1331fn bindgen_test_layout_RNode__bindgen_ty_2() {
1332 assert_eq!(
1333 ::std::mem::size_of::<RNode__bindgen_ty_2>(),
1334 8usize,
1335 concat!("Size of: ", stringify!(RNode__bindgen_ty_2))
1336 );
1337 assert_eq!(
1338 ::std::mem::align_of::<RNode__bindgen_ty_2>(),
1339 8usize,
1340 concat!("Alignment of ", stringify!(RNode__bindgen_ty_2))
1341 );
1342 assert_eq!(
1343 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_2>())).node as *const _ as usize },
1344 0usize,
1345 concat!(
1346 "Offset of field: ",
1347 stringify!(RNode__bindgen_ty_2),
1348 "::",
1349 stringify!(node)
1350 )
1351 );
1352 assert_eq!(
1353 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_2>())).id as *const _ as usize },
1354 0usize,
1355 concat!(
1356 "Offset of field: ",
1357 stringify!(RNode__bindgen_ty_2),
1358 "::",
1359 stringify!(id)
1360 )
1361 );
1362 assert_eq!(
1363 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_2>())).argc as *const _ as usize },
1364 0usize,
1365 concat!(
1366 "Offset of field: ",
1367 stringify!(RNode__bindgen_ty_2),
1368 "::",
1369 stringify!(argc)
1370 )
1371 );
1372 assert_eq!(
1373 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_2>())).value as *const _ as usize },
1374 0usize,
1375 concat!(
1376 "Offset of field: ",
1377 stringify!(RNode__bindgen_ty_2),
1378 "::",
1379 stringify!(value)
1380 )
1381 );
1382}
1383impl ::std::fmt::Debug for RNode__bindgen_ty_2 {
1384 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1385 write!(f, "RNode__bindgen_ty_2 {{ union }}")
1386 }
1387}
1388#[repr(C)]
1389#[derive(Copy, Clone)]
1390pub union RNode__bindgen_ty_3 {
1391 pub node: *mut RNode,
1392 pub id: ID,
1393 pub state: ::std::os::raw::c_long,
1394 pub entry: *mut rb_global_entry,
1395 pub cnt: ::std::os::raw::c_long,
1396 pub value: VALUE,
1397 _bindgen_union_align: u64,
1398}
1399#[test]
1400fn bindgen_test_layout_RNode__bindgen_ty_3() {
1401 assert_eq!(
1402 ::std::mem::size_of::<RNode__bindgen_ty_3>(),
1403 8usize,
1404 concat!("Size of: ", stringify!(RNode__bindgen_ty_3))
1405 );
1406 assert_eq!(
1407 ::std::mem::align_of::<RNode__bindgen_ty_3>(),
1408 8usize,
1409 concat!("Alignment of ", stringify!(RNode__bindgen_ty_3))
1410 );
1411 assert_eq!(
1412 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).node as *const _ as usize },
1413 0usize,
1414 concat!(
1415 "Offset of field: ",
1416 stringify!(RNode__bindgen_ty_3),
1417 "::",
1418 stringify!(node)
1419 )
1420 );
1421 assert_eq!(
1422 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).id as *const _ as usize },
1423 0usize,
1424 concat!(
1425 "Offset of field: ",
1426 stringify!(RNode__bindgen_ty_3),
1427 "::",
1428 stringify!(id)
1429 )
1430 );
1431 assert_eq!(
1432 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).state as *const _ as usize },
1433 0usize,
1434 concat!(
1435 "Offset of field: ",
1436 stringify!(RNode__bindgen_ty_3),
1437 "::",
1438 stringify!(state)
1439 )
1440 );
1441 assert_eq!(
1442 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).entry as *const _ as usize },
1443 0usize,
1444 concat!(
1445 "Offset of field: ",
1446 stringify!(RNode__bindgen_ty_3),
1447 "::",
1448 stringify!(entry)
1449 )
1450 );
1451 assert_eq!(
1452 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).cnt as *const _ as usize },
1453 0usize,
1454 concat!(
1455 "Offset of field: ",
1456 stringify!(RNode__bindgen_ty_3),
1457 "::",
1458 stringify!(cnt)
1459 )
1460 );
1461 assert_eq!(
1462 unsafe { &(*(::std::ptr::null::<RNode__bindgen_ty_3>())).value as *const _ as usize },
1463 0usize,
1464 concat!(
1465 "Offset of field: ",
1466 stringify!(RNode__bindgen_ty_3),
1467 "::",
1468 stringify!(value)
1469 )
1470 );
1471}
1472impl ::std::fmt::Debug for RNode__bindgen_ty_3 {
1473 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1474 write!(f, "RNode__bindgen_ty_3 {{ union }}")
1475 }
1476}
1477#[test]
1478fn bindgen_test_layout_RNode() {
1479 assert_eq!(
1480 ::std::mem::size_of::<RNode>(),
1481 40usize,
1482 concat!("Size of: ", stringify!(RNode))
1483 );
1484 assert_eq!(
1485 ::std::mem::align_of::<RNode>(),
1486 8usize,
1487 concat!("Alignment of ", stringify!(RNode))
1488 );
1489 assert_eq!(
1490 unsafe { &(*(::std::ptr::null::<RNode>())).flags as *const _ as usize },
1491 0usize,
1492 concat!(
1493 "Offset of field: ",
1494 stringify!(RNode),
1495 "::",
1496 stringify!(flags)
1497 )
1498 );
1499 assert_eq!(
1500 unsafe { &(*(::std::ptr::null::<RNode>())).nd_file as *const _ as usize },
1501 8usize,
1502 concat!(
1503 "Offset of field: ",
1504 stringify!(RNode),
1505 "::",
1506 stringify!(nd_file)
1507 )
1508 );
1509 assert_eq!(
1510 unsafe { &(*(::std::ptr::null::<RNode>())).u1 as *const _ as usize },
1511 16usize,
1512 concat!("Offset of field: ", stringify!(RNode), "::", stringify!(u1))
1513 );
1514 assert_eq!(
1515 unsafe { &(*(::std::ptr::null::<RNode>())).u2 as *const _ as usize },
1516 24usize,
1517 concat!("Offset of field: ", stringify!(RNode), "::", stringify!(u2))
1518 );
1519 assert_eq!(
1520 unsafe { &(*(::std::ptr::null::<RNode>())).u3 as *const _ as usize },
1521 32usize,
1522 concat!("Offset of field: ", stringify!(RNode), "::", stringify!(u3))
1523 );
1524}
1525impl ::std::fmt::Debug for RNode {
1526 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1527 write!(
1528 f,
1529 "RNode {{ flags: {:?}, nd_file: {:?}, u1: {:?}, u2: {:?}, u3: {:?} }}",
1530 self.flags, self.nd_file, self.u1, self.u2, self.u3
1531 )
1532 }
1533}
1534pub type NODE = RNode;
1535#[repr(C)]
1536#[derive(Debug, Copy, Clone)]
1537pub struct rb_global_entry {
1538 pub var: *mut rb_global_variable,
1539 pub id: ID,
1540}
1541#[test]
1542fn bindgen_test_layout_rb_global_entry() {
1543 assert_eq!(
1544 ::std::mem::size_of::<rb_global_entry>(),
1545 16usize,
1546 concat!("Size of: ", stringify!(rb_global_entry))
1547 );
1548 assert_eq!(
1549 ::std::mem::align_of::<rb_global_entry>(),
1550 8usize,
1551 concat!("Alignment of ", stringify!(rb_global_entry))
1552 );
1553 assert_eq!(
1554 unsafe { &(*(::std::ptr::null::<rb_global_entry>())).var as *const _ as usize },
1555 0usize,
1556 concat!(
1557 "Offset of field: ",
1558 stringify!(rb_global_entry),
1559 "::",
1560 stringify!(var)
1561 )
1562 );
1563 assert_eq!(
1564 unsafe { &(*(::std::ptr::null::<rb_global_entry>())).id as *const _ as usize },
1565 8usize,
1566 concat!(
1567 "Offset of field: ",
1568 stringify!(rb_global_entry),
1569 "::",
1570 stringify!(id)
1571 )
1572 );
1573}
1574pub const rb_method_flag_t_NOEX_PUBLIC: rb_method_flag_t = 0;
1575pub const rb_method_flag_t_NOEX_NOSUPER: rb_method_flag_t = 1;
1576pub const rb_method_flag_t_NOEX_PRIVATE: rb_method_flag_t = 2;
1577pub const rb_method_flag_t_NOEX_PROTECTED: rb_method_flag_t = 4;
1578pub const rb_method_flag_t_NOEX_MASK: rb_method_flag_t = 6;
1579pub const rb_method_flag_t_NOEX_BASIC: rb_method_flag_t = 8;
1580pub const rb_method_flag_t_NOEX_UNDEF: rb_method_flag_t = 1;
1581pub const rb_method_flag_t_NOEX_MODFUNC: rb_method_flag_t = 18;
1582pub const rb_method_flag_t_NOEX_SUPER: rb_method_flag_t = 32;
1583pub const rb_method_flag_t_NOEX_VCALL: rb_method_flag_t = 64;
1584pub const rb_method_flag_t_NOEX_RESPONDS: rb_method_flag_t = 128;
1585pub type rb_method_flag_t = ::std::os::raw::c_uint;
1586pub const rb_method_type_t_VM_METHOD_TYPE_ISEQ: rb_method_type_t = 0;
1587pub const rb_method_type_t_VM_METHOD_TYPE_CFUNC: rb_method_type_t = 1;
1588pub const rb_method_type_t_VM_METHOD_TYPE_ATTRSET: rb_method_type_t = 2;
1589pub const rb_method_type_t_VM_METHOD_TYPE_IVAR: rb_method_type_t = 3;
1590pub const rb_method_type_t_VM_METHOD_TYPE_BMETHOD: rb_method_type_t = 4;
1591pub const rb_method_type_t_VM_METHOD_TYPE_ZSUPER: rb_method_type_t = 5;
1592pub const rb_method_type_t_VM_METHOD_TYPE_UNDEF: rb_method_type_t = 6;
1593pub const rb_method_type_t_VM_METHOD_TYPE_NOTIMPLEMENTED: rb_method_type_t = 7;
1594pub const rb_method_type_t_VM_METHOD_TYPE_OPTIMIZED: rb_method_type_t = 8;
1595pub const rb_method_type_t_VM_METHOD_TYPE_MISSING: rb_method_type_t = 9;
1596pub type rb_method_type_t = ::std::os::raw::c_uint;
1597#[repr(C)]
1598#[derive(Debug, Copy, Clone)]
1599pub struct rb_method_cfunc_struct {
1600 pub func: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
1601 pub argc: ::std::os::raw::c_int,
1602}
1603#[test]
1604fn bindgen_test_layout_rb_method_cfunc_struct() {
1605 assert_eq!(
1606 ::std::mem::size_of::<rb_method_cfunc_struct>(),
1607 16usize,
1608 concat!("Size of: ", stringify!(rb_method_cfunc_struct))
1609 );
1610 assert_eq!(
1611 ::std::mem::align_of::<rb_method_cfunc_struct>(),
1612 8usize,
1613 concat!("Alignment of ", stringify!(rb_method_cfunc_struct))
1614 );
1615 assert_eq!(
1616 unsafe { &(*(::std::ptr::null::<rb_method_cfunc_struct>())).func as *const _ as usize },
1617 0usize,
1618 concat!(
1619 "Offset of field: ",
1620 stringify!(rb_method_cfunc_struct),
1621 "::",
1622 stringify!(func)
1623 )
1624 );
1625 assert_eq!(
1626 unsafe { &(*(::std::ptr::null::<rb_method_cfunc_struct>())).argc as *const _ as usize },
1627 8usize,
1628 concat!(
1629 "Offset of field: ",
1630 stringify!(rb_method_cfunc_struct),
1631 "::",
1632 stringify!(argc)
1633 )
1634 );
1635}
1636pub type rb_method_cfunc_t = rb_method_cfunc_struct;
1637#[repr(C)]
1638#[derive(Debug, Copy, Clone)]
1639pub struct rb_method_attr_struct {
1640 pub id: ID,
1641 pub location: VALUE,
1642}
1643#[test]
1644fn bindgen_test_layout_rb_method_attr_struct() {
1645 assert_eq!(
1646 ::std::mem::size_of::<rb_method_attr_struct>(),
1647 16usize,
1648 concat!("Size of: ", stringify!(rb_method_attr_struct))
1649 );
1650 assert_eq!(
1651 ::std::mem::align_of::<rb_method_attr_struct>(),
1652 8usize,
1653 concat!("Alignment of ", stringify!(rb_method_attr_struct))
1654 );
1655 assert_eq!(
1656 unsafe { &(*(::std::ptr::null::<rb_method_attr_struct>())).id as *const _ as usize },
1657 0usize,
1658 concat!(
1659 "Offset of field: ",
1660 stringify!(rb_method_attr_struct),
1661 "::",
1662 stringify!(id)
1663 )
1664 );
1665 assert_eq!(
1666 unsafe { &(*(::std::ptr::null::<rb_method_attr_struct>())).location as *const _ as usize },
1667 8usize,
1668 concat!(
1669 "Offset of field: ",
1670 stringify!(rb_method_attr_struct),
1671 "::",
1672 stringify!(location)
1673 )
1674 );
1675}
1676pub type rb_method_attr_t = rb_method_attr_struct;
1677pub type rb_iseq_t = rb_iseq_struct;
1678#[repr(C)]
1679#[derive(Copy, Clone)]
1680pub struct rb_method_definition_struct {
1681 pub type_: rb_method_type_t,
1682 pub original_id: ID,
1683 pub body: rb_method_definition_struct__bindgen_ty_1,
1684 pub alias_count: ::std::os::raw::c_int,
1685}
1686#[repr(C)]
1687#[derive(Copy, Clone)]
1688pub union rb_method_definition_struct__bindgen_ty_1 {
1689 pub iseq: *mut rb_iseq_t,
1690 pub cfunc: rb_method_cfunc_t,
1691 pub attr: rb_method_attr_t,
1692 pub proc_: VALUE,
1693 pub optimize_type: rb_method_definition_struct__bindgen_ty_1_method_optimized_type,
1694 _bindgen_union_align: [u64; 2usize],
1695}
1696pub const rb_method_definition_struct__bindgen_ty_1_method_optimized_type_OPTIMIZED_METHOD_TYPE_SEND : rb_method_definition_struct__bindgen_ty_1_method_optimized_type = 0 ;
1697pub const rb_method_definition_struct__bindgen_ty_1_method_optimized_type_OPTIMIZED_METHOD_TYPE_CALL : rb_method_definition_struct__bindgen_ty_1_method_optimized_type = 1 ;
1698pub type rb_method_definition_struct__bindgen_ty_1_method_optimized_type = ::std::os::raw::c_uint;
1699#[test]
1700fn bindgen_test_layout_rb_method_definition_struct__bindgen_ty_1() {
1701 assert_eq!(
1702 ::std::mem::size_of::<rb_method_definition_struct__bindgen_ty_1>(),
1703 16usize,
1704 concat!(
1705 "Size of: ",
1706 stringify!(rb_method_definition_struct__bindgen_ty_1)
1707 )
1708 );
1709 assert_eq!(
1710 ::std::mem::align_of::<rb_method_definition_struct__bindgen_ty_1>(),
1711 8usize,
1712 concat!(
1713 "Alignment of ",
1714 stringify!(rb_method_definition_struct__bindgen_ty_1)
1715 )
1716 );
1717 assert_eq!(
1718 unsafe {
1719 &(*(::std::ptr::null::<rb_method_definition_struct__bindgen_ty_1>())).iseq as *const _
1720 as usize
1721 },
1722 0usize,
1723 concat!(
1724 "Offset of field: ",
1725 stringify!(rb_method_definition_struct__bindgen_ty_1),
1726 "::",
1727 stringify!(iseq)
1728 )
1729 );
1730 assert_eq!(
1731 unsafe {
1732 &(*(::std::ptr::null::<rb_method_definition_struct__bindgen_ty_1>())).cfunc as *const _
1733 as usize
1734 },
1735 0usize,
1736 concat!(
1737 "Offset of field: ",
1738 stringify!(rb_method_definition_struct__bindgen_ty_1),
1739 "::",
1740 stringify!(cfunc)
1741 )
1742 );
1743 assert_eq!(
1744 unsafe {
1745 &(*(::std::ptr::null::<rb_method_definition_struct__bindgen_ty_1>())).attr as *const _
1746 as usize
1747 },
1748 0usize,
1749 concat!(
1750 "Offset of field: ",
1751 stringify!(rb_method_definition_struct__bindgen_ty_1),
1752 "::",
1753 stringify!(attr)
1754 )
1755 );
1756 assert_eq!(
1757 unsafe {
1758 &(*(::std::ptr::null::<rb_method_definition_struct__bindgen_ty_1>())).proc_ as *const _
1759 as usize
1760 },
1761 0usize,
1762 concat!(
1763 "Offset of field: ",
1764 stringify!(rb_method_definition_struct__bindgen_ty_1),
1765 "::",
1766 stringify!(proc_)
1767 )
1768 );
1769 assert_eq!(
1770 unsafe {
1771 &(*(::std::ptr::null::<rb_method_definition_struct__bindgen_ty_1>())).optimize_type
1772 as *const _ as usize
1773 },
1774 0usize,
1775 concat!(
1776 "Offset of field: ",
1777 stringify!(rb_method_definition_struct__bindgen_ty_1),
1778 "::",
1779 stringify!(optimize_type)
1780 )
1781 );
1782}
1783impl ::std::fmt::Debug for rb_method_definition_struct__bindgen_ty_1 {
1784 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1785 write!(f, "rb_method_definition_struct__bindgen_ty_1 {{ union }}")
1786 }
1787}
1788#[test]
1789fn bindgen_test_layout_rb_method_definition_struct() {
1790 assert_eq!(
1791 ::std::mem::size_of::<rb_method_definition_struct>(),
1792 40usize,
1793 concat!("Size of: ", stringify!(rb_method_definition_struct))
1794 );
1795 assert_eq!(
1796 ::std::mem::align_of::<rb_method_definition_struct>(),
1797 8usize,
1798 concat!("Alignment of ", stringify!(rb_method_definition_struct))
1799 );
1800 assert_eq!(
1801 unsafe {
1802 &(*(::std::ptr::null::<rb_method_definition_struct>())).type_ as *const _ as usize
1803 },
1804 0usize,
1805 concat!(
1806 "Offset of field: ",
1807 stringify!(rb_method_definition_struct),
1808 "::",
1809 stringify!(type_)
1810 )
1811 );
1812 assert_eq!(
1813 unsafe {
1814 &(*(::std::ptr::null::<rb_method_definition_struct>())).original_id as *const _ as usize
1815 },
1816 8usize,
1817 concat!(
1818 "Offset of field: ",
1819 stringify!(rb_method_definition_struct),
1820 "::",
1821 stringify!(original_id)
1822 )
1823 );
1824 assert_eq!(
1825 unsafe {
1826 &(*(::std::ptr::null::<rb_method_definition_struct>())).body as *const _ as usize
1827 },
1828 16usize,
1829 concat!(
1830 "Offset of field: ",
1831 stringify!(rb_method_definition_struct),
1832 "::",
1833 stringify!(body)
1834 )
1835 );
1836 assert_eq!(
1837 unsafe {
1838 &(*(::std::ptr::null::<rb_method_definition_struct>())).alias_count as *const _ as usize
1839 },
1840 32usize,
1841 concat!(
1842 "Offset of field: ",
1843 stringify!(rb_method_definition_struct),
1844 "::",
1845 stringify!(alias_count)
1846 )
1847 );
1848}
1849impl ::std::fmt::Debug for rb_method_definition_struct {
1850 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
1851 write ! ( f , "rb_method_definition_struct {{ type: {:?}, original_id: {:?}, body: {:?}, alias_count: {:?} }}" , self . type_ , self . original_id , self . body , self . alias_count )
1852 }
1853}
1854pub type rb_method_definition_t = rb_method_definition_struct;
1855#[repr(C)]
1856#[derive(Debug, Copy, Clone)]
1857pub struct rb_method_entry_struct {
1858 pub flag: rb_method_flag_t,
1859 pub mark: ::std::os::raw::c_char,
1860 pub def: *mut rb_method_definition_t,
1861 pub called_id: ID,
1862 pub klass: VALUE,
1863}
1864#[test]
1865fn bindgen_test_layout_rb_method_entry_struct() {
1866 assert_eq!(
1867 ::std::mem::size_of::<rb_method_entry_struct>(),
1868 32usize,
1869 concat!("Size of: ", stringify!(rb_method_entry_struct))
1870 );
1871 assert_eq!(
1872 ::std::mem::align_of::<rb_method_entry_struct>(),
1873 8usize,
1874 concat!("Alignment of ", stringify!(rb_method_entry_struct))
1875 );
1876 assert_eq!(
1877 unsafe { &(*(::std::ptr::null::<rb_method_entry_struct>())).flag as *const _ as usize },
1878 0usize,
1879 concat!(
1880 "Offset of field: ",
1881 stringify!(rb_method_entry_struct),
1882 "::",
1883 stringify!(flag)
1884 )
1885 );
1886 assert_eq!(
1887 unsafe { &(*(::std::ptr::null::<rb_method_entry_struct>())).mark as *const _ as usize },
1888 4usize,
1889 concat!(
1890 "Offset of field: ",
1891 stringify!(rb_method_entry_struct),
1892 "::",
1893 stringify!(mark)
1894 )
1895 );
1896 assert_eq!(
1897 unsafe { &(*(::std::ptr::null::<rb_method_entry_struct>())).def as *const _ as usize },
1898 8usize,
1899 concat!(
1900 "Offset of field: ",
1901 stringify!(rb_method_entry_struct),
1902 "::",
1903 stringify!(def)
1904 )
1905 );
1906 assert_eq!(
1907 unsafe {
1908 &(*(::std::ptr::null::<rb_method_entry_struct>())).called_id as *const _ as usize
1909 },
1910 16usize,
1911 concat!(
1912 "Offset of field: ",
1913 stringify!(rb_method_entry_struct),
1914 "::",
1915 stringify!(called_id)
1916 )
1917 );
1918 assert_eq!(
1919 unsafe { &(*(::std::ptr::null::<rb_method_entry_struct>())).klass as *const _ as usize },
1920 24usize,
1921 concat!(
1922 "Offset of field: ",
1923 stringify!(rb_method_entry_struct),
1924 "::",
1925 stringify!(klass)
1926 )
1927 );
1928}
1929pub type rb_method_entry_t = rb_method_entry_struct;
1930#[repr(C)]
1931#[derive(Debug, Copy, Clone)]
1932pub struct unlinked_method_entry_list_entry {
1933 pub next: *mut unlinked_method_entry_list_entry,
1934 pub me: *mut rb_method_entry_t,
1935}
1936#[test]
1937fn bindgen_test_layout_unlinked_method_entry_list_entry() {
1938 assert_eq!(
1939 ::std::mem::size_of::<unlinked_method_entry_list_entry>(),
1940 16usize,
1941 concat!("Size of: ", stringify!(unlinked_method_entry_list_entry))
1942 );
1943 assert_eq!(
1944 ::std::mem::align_of::<unlinked_method_entry_list_entry>(),
1945 8usize,
1946 concat!(
1947 "Alignment of ",
1948 stringify!(unlinked_method_entry_list_entry)
1949 )
1950 );
1951 assert_eq!(
1952 unsafe {
1953 &(*(::std::ptr::null::<unlinked_method_entry_list_entry>())).next as *const _ as usize
1954 },
1955 0usize,
1956 concat!(
1957 "Offset of field: ",
1958 stringify!(unlinked_method_entry_list_entry),
1959 "::",
1960 stringify!(next)
1961 )
1962 );
1963 assert_eq!(
1964 unsafe {
1965 &(*(::std::ptr::null::<unlinked_method_entry_list_entry>())).me as *const _ as usize
1966 },
1967 8usize,
1968 concat!(
1969 "Offset of field: ",
1970 stringify!(unlinked_method_entry_list_entry),
1971 "::",
1972 stringify!(me)
1973 )
1974 );
1975}
1976pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
1977pub type rb_thread_id_t = pthread_t;
1978pub type rb_thread_lock_t = pthread_mutex_t;
1979#[repr(C)]
1980#[derive(Copy, Clone)]
1981pub struct native_thread_data_struct {
1982 pub signal_thread_list: *mut ::std::os::raw::c_void,
1983 pub sleep_cond: pthread_cond_t,
1984}
1985#[test]
1986fn bindgen_test_layout_native_thread_data_struct() {
1987 assert_eq!(
1988 ::std::mem::size_of::<native_thread_data_struct>(),
1989 56usize,
1990 concat!("Size of: ", stringify!(native_thread_data_struct))
1991 );
1992 assert_eq!(
1993 ::std::mem::align_of::<native_thread_data_struct>(),
1994 8usize,
1995 concat!("Alignment of ", stringify!(native_thread_data_struct))
1996 );
1997 assert_eq!(
1998 unsafe {
1999 &(*(::std::ptr::null::<native_thread_data_struct>())).signal_thread_list as *const _
2000 as usize
2001 },
2002 0usize,
2003 concat!(
2004 "Offset of field: ",
2005 stringify!(native_thread_data_struct),
2006 "::",
2007 stringify!(signal_thread_list)
2008 )
2009 );
2010 assert_eq!(
2011 unsafe {
2012 &(*(::std::ptr::null::<native_thread_data_struct>())).sleep_cond as *const _ as usize
2013 },
2014 8usize,
2015 concat!(
2016 "Offset of field: ",
2017 stringify!(native_thread_data_struct),
2018 "::",
2019 stringify!(sleep_cond)
2020 )
2021 );
2022}
2023impl ::std::fmt::Debug for native_thread_data_struct {
2024 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2025 write!(
2026 f,
2027 "native_thread_data_struct {{ signal_thread_list: {:?}, sleep_cond: {:?} }}",
2028 self.signal_thread_list, self.sleep_cond
2029 )
2030 }
2031}
2032pub type native_thread_data_t = native_thread_data_struct;
2033#[repr(C)]
2034#[derive(Debug, Copy, Clone)]
2035pub struct __jmp_buf_tag {
2036 pub __jmpbuf: __jmp_buf,
2037 pub __mask_was_saved: ::std::os::raw::c_int,
2038 pub __saved_mask: __sigset_t,
2039}
2040#[test]
2041fn bindgen_test_layout___jmp_buf_tag() {
2042 assert_eq!(
2043 ::std::mem::size_of::<__jmp_buf_tag>(),
2044 200usize,
2045 concat!("Size of: ", stringify!(__jmp_buf_tag))
2046 );
2047 assert_eq!(
2048 ::std::mem::align_of::<__jmp_buf_tag>(),
2049 8usize,
2050 concat!("Alignment of ", stringify!(__jmp_buf_tag))
2051 );
2052 assert_eq!(
2053 unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__jmpbuf as *const _ as usize },
2054 0usize,
2055 concat!(
2056 "Offset of field: ",
2057 stringify!(__jmp_buf_tag),
2058 "::",
2059 stringify!(__jmpbuf)
2060 )
2061 );
2062 assert_eq!(
2063 unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__mask_was_saved as *const _ as usize },
2064 64usize,
2065 concat!(
2066 "Offset of field: ",
2067 stringify!(__jmp_buf_tag),
2068 "::",
2069 stringify!(__mask_was_saved)
2070 )
2071 );
2072 assert_eq!(
2073 unsafe { &(*(::std::ptr::null::<__jmp_buf_tag>())).__saved_mask as *const _ as usize },
2074 72usize,
2075 concat!(
2076 "Offset of field: ",
2077 stringify!(__jmp_buf_tag),
2078 "::",
2079 stringify!(__saved_mask)
2080 )
2081 );
2082}
2083pub type jmp_buf = [__jmp_buf_tag; 1usize];
2084#[repr(C)]
2085#[derive(Debug, Copy, Clone)]
2086pub struct iseq_compile_data_ensure_node_stack {
2087 _unused: [u8; 0],
2088}
2089#[repr(C)]
2090#[derive(Debug, Copy, Clone)]
2091pub struct rb_compile_option_struct {
2092 pub inline_const_cache: ::std::os::raw::c_int,
2093 pub peephole_optimization: ::std::os::raw::c_int,
2094 pub tailcall_optimization: ::std::os::raw::c_int,
2095 pub specialized_instruction: ::std::os::raw::c_int,
2096 pub operands_unification: ::std::os::raw::c_int,
2097 pub instructions_unification: ::std::os::raw::c_int,
2098 pub stack_caching: ::std::os::raw::c_int,
2099 pub trace_instruction: ::std::os::raw::c_int,
2100 pub debug_level: ::std::os::raw::c_int,
2101}
2102#[test]
2103fn bindgen_test_layout_rb_compile_option_struct() {
2104 assert_eq!(
2105 ::std::mem::size_of::<rb_compile_option_struct>(),
2106 36usize,
2107 concat!("Size of: ", stringify!(rb_compile_option_struct))
2108 );
2109 assert_eq!(
2110 ::std::mem::align_of::<rb_compile_option_struct>(),
2111 4usize,
2112 concat!("Alignment of ", stringify!(rb_compile_option_struct))
2113 );
2114 assert_eq!(
2115 unsafe {
2116 &(*(::std::ptr::null::<rb_compile_option_struct>())).inline_const_cache as *const _
2117 as usize
2118 },
2119 0usize,
2120 concat!(
2121 "Offset of field: ",
2122 stringify!(rb_compile_option_struct),
2123 "::",
2124 stringify!(inline_const_cache)
2125 )
2126 );
2127 assert_eq!(
2128 unsafe {
2129 &(*(::std::ptr::null::<rb_compile_option_struct>())).peephole_optimization as *const _
2130 as usize
2131 },
2132 4usize,
2133 concat!(
2134 "Offset of field: ",
2135 stringify!(rb_compile_option_struct),
2136 "::",
2137 stringify!(peephole_optimization)
2138 )
2139 );
2140 assert_eq!(
2141 unsafe {
2142 &(*(::std::ptr::null::<rb_compile_option_struct>())).tailcall_optimization as *const _
2143 as usize
2144 },
2145 8usize,
2146 concat!(
2147 "Offset of field: ",
2148 stringify!(rb_compile_option_struct),
2149 "::",
2150 stringify!(tailcall_optimization)
2151 )
2152 );
2153 assert_eq!(
2154 unsafe {
2155 &(*(::std::ptr::null::<rb_compile_option_struct>())).specialized_instruction as *const _
2156 as usize
2157 },
2158 12usize,
2159 concat!(
2160 "Offset of field: ",
2161 stringify!(rb_compile_option_struct),
2162 "::",
2163 stringify!(specialized_instruction)
2164 )
2165 );
2166 assert_eq!(
2167 unsafe {
2168 &(*(::std::ptr::null::<rb_compile_option_struct>())).operands_unification as *const _
2169 as usize
2170 },
2171 16usize,
2172 concat!(
2173 "Offset of field: ",
2174 stringify!(rb_compile_option_struct),
2175 "::",
2176 stringify!(operands_unification)
2177 )
2178 );
2179 assert_eq!(
2180 unsafe {
2181 &(*(::std::ptr::null::<rb_compile_option_struct>())).instructions_unification
2182 as *const _ as usize
2183 },
2184 20usize,
2185 concat!(
2186 "Offset of field: ",
2187 stringify!(rb_compile_option_struct),
2188 "::",
2189 stringify!(instructions_unification)
2190 )
2191 );
2192 assert_eq!(
2193 unsafe {
2194 &(*(::std::ptr::null::<rb_compile_option_struct>())).stack_caching as *const _ as usize
2195 },
2196 24usize,
2197 concat!(
2198 "Offset of field: ",
2199 stringify!(rb_compile_option_struct),
2200 "::",
2201 stringify!(stack_caching)
2202 )
2203 );
2204 assert_eq!(
2205 unsafe {
2206 &(*(::std::ptr::null::<rb_compile_option_struct>())).trace_instruction as *const _
2207 as usize
2208 },
2209 28usize,
2210 concat!(
2211 "Offset of field: ",
2212 stringify!(rb_compile_option_struct),
2213 "::",
2214 stringify!(trace_instruction)
2215 )
2216 );
2217 assert_eq!(
2218 unsafe {
2219 &(*(::std::ptr::null::<rb_compile_option_struct>())).debug_level as *const _ as usize
2220 },
2221 32usize,
2222 concat!(
2223 "Offset of field: ",
2224 stringify!(rb_compile_option_struct),
2225 "::",
2226 stringify!(debug_level)
2227 )
2228 );
2229}
2230pub type rb_compile_option_t = rb_compile_option_struct;
2231#[repr(C)]
2232#[derive(Copy, Clone)]
2233pub struct iseq_inline_cache_entry {
2234 pub ic_vmstat: VALUE,
2235 pub ic_class: VALUE,
2236 pub ic_value: iseq_inline_cache_entry__bindgen_ty_1,
2237}
2238#[repr(C)]
2239#[derive(Copy, Clone)]
2240pub union iseq_inline_cache_entry__bindgen_ty_1 {
2241 pub value: VALUE,
2242 pub method: *mut rb_method_entry_t,
2243 pub index: ::std::os::raw::c_long,
2244 _bindgen_union_align: u64,
2245}
2246#[test]
2247fn bindgen_test_layout_iseq_inline_cache_entry__bindgen_ty_1() {
2248 assert_eq!(
2249 ::std::mem::size_of::<iseq_inline_cache_entry__bindgen_ty_1>(),
2250 8usize,
2251 concat!(
2252 "Size of: ",
2253 stringify!(iseq_inline_cache_entry__bindgen_ty_1)
2254 )
2255 );
2256 assert_eq!(
2257 ::std::mem::align_of::<iseq_inline_cache_entry__bindgen_ty_1>(),
2258 8usize,
2259 concat!(
2260 "Alignment of ",
2261 stringify!(iseq_inline_cache_entry__bindgen_ty_1)
2262 )
2263 );
2264 assert_eq!(
2265 unsafe {
2266 &(*(::std::ptr::null::<iseq_inline_cache_entry__bindgen_ty_1>())).value as *const _
2267 as usize
2268 },
2269 0usize,
2270 concat!(
2271 "Offset of field: ",
2272 stringify!(iseq_inline_cache_entry__bindgen_ty_1),
2273 "::",
2274 stringify!(value)
2275 )
2276 );
2277 assert_eq!(
2278 unsafe {
2279 &(*(::std::ptr::null::<iseq_inline_cache_entry__bindgen_ty_1>())).method as *const _
2280 as usize
2281 },
2282 0usize,
2283 concat!(
2284 "Offset of field: ",
2285 stringify!(iseq_inline_cache_entry__bindgen_ty_1),
2286 "::",
2287 stringify!(method)
2288 )
2289 );
2290 assert_eq!(
2291 unsafe {
2292 &(*(::std::ptr::null::<iseq_inline_cache_entry__bindgen_ty_1>())).index as *const _
2293 as usize
2294 },
2295 0usize,
2296 concat!(
2297 "Offset of field: ",
2298 stringify!(iseq_inline_cache_entry__bindgen_ty_1),
2299 "::",
2300 stringify!(index)
2301 )
2302 );
2303}
2304impl ::std::fmt::Debug for iseq_inline_cache_entry__bindgen_ty_1 {
2305 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2306 write!(f, "iseq_inline_cache_entry__bindgen_ty_1 {{ union }}")
2307 }
2308}
2309#[test]
2310fn bindgen_test_layout_iseq_inline_cache_entry() {
2311 assert_eq!(
2312 ::std::mem::size_of::<iseq_inline_cache_entry>(),
2313 24usize,
2314 concat!("Size of: ", stringify!(iseq_inline_cache_entry))
2315 );
2316 assert_eq!(
2317 ::std::mem::align_of::<iseq_inline_cache_entry>(),
2318 8usize,
2319 concat!("Alignment of ", stringify!(iseq_inline_cache_entry))
2320 );
2321 assert_eq!(
2322 unsafe {
2323 &(*(::std::ptr::null::<iseq_inline_cache_entry>())).ic_vmstat as *const _ as usize
2324 },
2325 0usize,
2326 concat!(
2327 "Offset of field: ",
2328 stringify!(iseq_inline_cache_entry),
2329 "::",
2330 stringify!(ic_vmstat)
2331 )
2332 );
2333 assert_eq!(
2334 unsafe {
2335 &(*(::std::ptr::null::<iseq_inline_cache_entry>())).ic_class as *const _ as usize
2336 },
2337 8usize,
2338 concat!(
2339 "Offset of field: ",
2340 stringify!(iseq_inline_cache_entry),
2341 "::",
2342 stringify!(ic_class)
2343 )
2344 );
2345 assert_eq!(
2346 unsafe {
2347 &(*(::std::ptr::null::<iseq_inline_cache_entry>())).ic_value as *const _ as usize
2348 },
2349 16usize,
2350 concat!(
2351 "Offset of field: ",
2352 stringify!(iseq_inline_cache_entry),
2353 "::",
2354 stringify!(ic_value)
2355 )
2356 );
2357}
2358impl ::std::fmt::Debug for iseq_inline_cache_entry {
2359 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
2360 write!(
2361 f,
2362 "iseq_inline_cache_entry {{ ic_vmstat: {:?}, ic_class: {:?}, ic_value: {:?} }}",
2363 self.ic_vmstat, self.ic_class, self.ic_value
2364 )
2365 }
2366}
2367#[repr(C)]
2368#[derive(Debug, Copy, Clone)]
2369pub struct rb_iseq_struct {
2370 pub type_: VALUE,
2371 pub name: VALUE,
2372 pub filename: VALUE,
2373 pub filepath: VALUE,
2374 pub iseq: *mut VALUE,
2375 pub iseq_encoded: *mut VALUE,
2376 pub iseq_size: ::std::os::raw::c_ulong,
2377 pub mark_ary: VALUE,
2378 pub coverage: VALUE,
2379 pub line_no: ::std::os::raw::c_ushort,
2380 pub insn_info_table: *mut iseq_insn_info_entry,
2381 pub insn_info_size: usize,
2382 pub local_table: *mut ID,
2383 pub local_table_size: ::std::os::raw::c_int,
2384 pub local_size: ::std::os::raw::c_int,
2385 pub ic_entries: *mut iseq_inline_cache_entry,
2386 pub ic_size: ::std::os::raw::c_int,
2387 pub argc: ::std::os::raw::c_int,
2388 pub arg_simple: ::std::os::raw::c_int,
2389 pub arg_rest: ::std::os::raw::c_int,
2390 pub arg_block: ::std::os::raw::c_int,
2391 pub arg_opts: ::std::os::raw::c_int,
2392 pub arg_post_len: ::std::os::raw::c_int,
2393 pub arg_post_start: ::std::os::raw::c_int,
2394 pub arg_size: ::std::os::raw::c_int,
2395 pub arg_opt_table: *mut VALUE,
2396 pub stack_max: usize,
2397 pub catch_table: *mut iseq_catch_table_entry,
2398 pub catch_table_size: ::std::os::raw::c_int,
2399 pub parent_iseq: *mut rb_iseq_struct,
2400 pub local_iseq: *mut rb_iseq_struct,
2401 pub self_: VALUE,
2402 pub orig: VALUE,
2403 pub cref_stack: *mut NODE,
2404 pub klass: VALUE,
2405 pub defined_method_id: ID,
2406 pub compile_data: *mut iseq_compile_data,
2407}
2408#[test]
2409fn bindgen_test_layout_rb_iseq_struct() {
2410 assert_eq!(
2411 ::std::mem::size_of::<rb_iseq_struct>(),
2412 256usize,
2413 concat!("Size of: ", stringify!(rb_iseq_struct))
2414 );
2415 assert_eq!(
2416 ::std::mem::align_of::<rb_iseq_struct>(),
2417 8usize,
2418 concat!("Alignment of ", stringify!(rb_iseq_struct))
2419 );
2420 assert_eq!(
2421 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).type_ as *const _ as usize },
2422 0usize,
2423 concat!(
2424 "Offset of field: ",
2425 stringify!(rb_iseq_struct),
2426 "::",
2427 stringify!(type_)
2428 )
2429 );
2430 assert_eq!(
2431 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).name as *const _ as usize },
2432 8usize,
2433 concat!(
2434 "Offset of field: ",
2435 stringify!(rb_iseq_struct),
2436 "::",
2437 stringify!(name)
2438 )
2439 );
2440 assert_eq!(
2441 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).filename as *const _ as usize },
2442 16usize,
2443 concat!(
2444 "Offset of field: ",
2445 stringify!(rb_iseq_struct),
2446 "::",
2447 stringify!(filename)
2448 )
2449 );
2450 assert_eq!(
2451 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).filepath as *const _ as usize },
2452 24usize,
2453 concat!(
2454 "Offset of field: ",
2455 stringify!(rb_iseq_struct),
2456 "::",
2457 stringify!(filepath)
2458 )
2459 );
2460 assert_eq!(
2461 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).iseq as *const _ as usize },
2462 32usize,
2463 concat!(
2464 "Offset of field: ",
2465 stringify!(rb_iseq_struct),
2466 "::",
2467 stringify!(iseq)
2468 )
2469 );
2470 assert_eq!(
2471 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).iseq_encoded as *const _ as usize },
2472 40usize,
2473 concat!(
2474 "Offset of field: ",
2475 stringify!(rb_iseq_struct),
2476 "::",
2477 stringify!(iseq_encoded)
2478 )
2479 );
2480 assert_eq!(
2481 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).iseq_size as *const _ as usize },
2482 48usize,
2483 concat!(
2484 "Offset of field: ",
2485 stringify!(rb_iseq_struct),
2486 "::",
2487 stringify!(iseq_size)
2488 )
2489 );
2490 assert_eq!(
2491 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).mark_ary as *const _ as usize },
2492 56usize,
2493 concat!(
2494 "Offset of field: ",
2495 stringify!(rb_iseq_struct),
2496 "::",
2497 stringify!(mark_ary)
2498 )
2499 );
2500 assert_eq!(
2501 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).coverage as *const _ as usize },
2502 64usize,
2503 concat!(
2504 "Offset of field: ",
2505 stringify!(rb_iseq_struct),
2506 "::",
2507 stringify!(coverage)
2508 )
2509 );
2510 assert_eq!(
2511 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).line_no as *const _ as usize },
2512 72usize,
2513 concat!(
2514 "Offset of field: ",
2515 stringify!(rb_iseq_struct),
2516 "::",
2517 stringify!(line_no)
2518 )
2519 );
2520 assert_eq!(
2521 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).insn_info_table as *const _ as usize },
2522 80usize,
2523 concat!(
2524 "Offset of field: ",
2525 stringify!(rb_iseq_struct),
2526 "::",
2527 stringify!(insn_info_table)
2528 )
2529 );
2530 assert_eq!(
2531 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).insn_info_size as *const _ as usize },
2532 88usize,
2533 concat!(
2534 "Offset of field: ",
2535 stringify!(rb_iseq_struct),
2536 "::",
2537 stringify!(insn_info_size)
2538 )
2539 );
2540 assert_eq!(
2541 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).local_table as *const _ as usize },
2542 96usize,
2543 concat!(
2544 "Offset of field: ",
2545 stringify!(rb_iseq_struct),
2546 "::",
2547 stringify!(local_table)
2548 )
2549 );
2550 assert_eq!(
2551 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).local_table_size as *const _ as usize },
2552 104usize,
2553 concat!(
2554 "Offset of field: ",
2555 stringify!(rb_iseq_struct),
2556 "::",
2557 stringify!(local_table_size)
2558 )
2559 );
2560 assert_eq!(
2561 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).local_size as *const _ as usize },
2562 108usize,
2563 concat!(
2564 "Offset of field: ",
2565 stringify!(rb_iseq_struct),
2566 "::",
2567 stringify!(local_size)
2568 )
2569 );
2570 assert_eq!(
2571 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).ic_entries as *const _ as usize },
2572 112usize,
2573 concat!(
2574 "Offset of field: ",
2575 stringify!(rb_iseq_struct),
2576 "::",
2577 stringify!(ic_entries)
2578 )
2579 );
2580 assert_eq!(
2581 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).ic_size as *const _ as usize },
2582 120usize,
2583 concat!(
2584 "Offset of field: ",
2585 stringify!(rb_iseq_struct),
2586 "::",
2587 stringify!(ic_size)
2588 )
2589 );
2590 assert_eq!(
2591 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).argc as *const _ as usize },
2592 124usize,
2593 concat!(
2594 "Offset of field: ",
2595 stringify!(rb_iseq_struct),
2596 "::",
2597 stringify!(argc)
2598 )
2599 );
2600 assert_eq!(
2601 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_simple as *const _ as usize },
2602 128usize,
2603 concat!(
2604 "Offset of field: ",
2605 stringify!(rb_iseq_struct),
2606 "::",
2607 stringify!(arg_simple)
2608 )
2609 );
2610 assert_eq!(
2611 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_rest as *const _ as usize },
2612 132usize,
2613 concat!(
2614 "Offset of field: ",
2615 stringify!(rb_iseq_struct),
2616 "::",
2617 stringify!(arg_rest)
2618 )
2619 );
2620 assert_eq!(
2621 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_block as *const _ as usize },
2622 136usize,
2623 concat!(
2624 "Offset of field: ",
2625 stringify!(rb_iseq_struct),
2626 "::",
2627 stringify!(arg_block)
2628 )
2629 );
2630 assert_eq!(
2631 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_opts as *const _ as usize },
2632 140usize,
2633 concat!(
2634 "Offset of field: ",
2635 stringify!(rb_iseq_struct),
2636 "::",
2637 stringify!(arg_opts)
2638 )
2639 );
2640 assert_eq!(
2641 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_post_len as *const _ as usize },
2642 144usize,
2643 concat!(
2644 "Offset of field: ",
2645 stringify!(rb_iseq_struct),
2646 "::",
2647 stringify!(arg_post_len)
2648 )
2649 );
2650 assert_eq!(
2651 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_post_start as *const _ as usize },
2652 148usize,
2653 concat!(
2654 "Offset of field: ",
2655 stringify!(rb_iseq_struct),
2656 "::",
2657 stringify!(arg_post_start)
2658 )
2659 );
2660 assert_eq!(
2661 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_size as *const _ as usize },
2662 152usize,
2663 concat!(
2664 "Offset of field: ",
2665 stringify!(rb_iseq_struct),
2666 "::",
2667 stringify!(arg_size)
2668 )
2669 );
2670 assert_eq!(
2671 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).arg_opt_table as *const _ as usize },
2672 160usize,
2673 concat!(
2674 "Offset of field: ",
2675 stringify!(rb_iseq_struct),
2676 "::",
2677 stringify!(arg_opt_table)
2678 )
2679 );
2680 assert_eq!(
2681 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).stack_max as *const _ as usize },
2682 168usize,
2683 concat!(
2684 "Offset of field: ",
2685 stringify!(rb_iseq_struct),
2686 "::",
2687 stringify!(stack_max)
2688 )
2689 );
2690 assert_eq!(
2691 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).catch_table as *const _ as usize },
2692 176usize,
2693 concat!(
2694 "Offset of field: ",
2695 stringify!(rb_iseq_struct),
2696 "::",
2697 stringify!(catch_table)
2698 )
2699 );
2700 assert_eq!(
2701 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).catch_table_size as *const _ as usize },
2702 184usize,
2703 concat!(
2704 "Offset of field: ",
2705 stringify!(rb_iseq_struct),
2706 "::",
2707 stringify!(catch_table_size)
2708 )
2709 );
2710 assert_eq!(
2711 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).parent_iseq as *const _ as usize },
2712 192usize,
2713 concat!(
2714 "Offset of field: ",
2715 stringify!(rb_iseq_struct),
2716 "::",
2717 stringify!(parent_iseq)
2718 )
2719 );
2720 assert_eq!(
2721 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).local_iseq as *const _ as usize },
2722 200usize,
2723 concat!(
2724 "Offset of field: ",
2725 stringify!(rb_iseq_struct),
2726 "::",
2727 stringify!(local_iseq)
2728 )
2729 );
2730 assert_eq!(
2731 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).self_ as *const _ as usize },
2732 208usize,
2733 concat!(
2734 "Offset of field: ",
2735 stringify!(rb_iseq_struct),
2736 "::",
2737 stringify!(self_)
2738 )
2739 );
2740 assert_eq!(
2741 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).orig as *const _ as usize },
2742 216usize,
2743 concat!(
2744 "Offset of field: ",
2745 stringify!(rb_iseq_struct),
2746 "::",
2747 stringify!(orig)
2748 )
2749 );
2750 assert_eq!(
2751 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).cref_stack as *const _ as usize },
2752 224usize,
2753 concat!(
2754 "Offset of field: ",
2755 stringify!(rb_iseq_struct),
2756 "::",
2757 stringify!(cref_stack)
2758 )
2759 );
2760 assert_eq!(
2761 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).klass as *const _ as usize },
2762 232usize,
2763 concat!(
2764 "Offset of field: ",
2765 stringify!(rb_iseq_struct),
2766 "::",
2767 stringify!(klass)
2768 )
2769 );
2770 assert_eq!(
2771 unsafe {
2772 &(*(::std::ptr::null::<rb_iseq_struct>())).defined_method_id as *const _ as usize
2773 },
2774 240usize,
2775 concat!(
2776 "Offset of field: ",
2777 stringify!(rb_iseq_struct),
2778 "::",
2779 stringify!(defined_method_id)
2780 )
2781 );
2782 assert_eq!(
2783 unsafe { &(*(::std::ptr::null::<rb_iseq_struct>())).compile_data as *const _ as usize },
2784 248usize,
2785 concat!(
2786 "Offset of field: ",
2787 stringify!(rb_iseq_struct),
2788 "::",
2789 stringify!(compile_data)
2790 )
2791 );
2792}
2793#[repr(C)]
2794#[derive(Debug, Copy, Clone)]
2795pub struct rb_objspace {
2796 _unused: [u8; 0],
2797}
2798#[repr(C)]
2799#[derive(Copy, Clone)]
2800pub struct rb_vm_struct {
2801 pub self_: VALUE,
2802 pub global_vm_lock: rb_thread_lock_t,
2803 pub main_thread: *mut rb_thread_struct,
2804 pub running_thread: *mut rb_thread_struct,
2805 pub living_threads: *mut st_table,
2806 pub thgroup_default: VALUE,
2807 pub running: ::std::os::raw::c_int,
2808 pub thread_abort_on_exception: ::std::os::raw::c_int,
2809 pub trace_flag: ::std::os::raw::c_ulong,
2810 pub sleeper: ::std::os::raw::c_int,
2811 pub mark_object_ary: VALUE,
2812 pub special_exceptions: [VALUE; 3usize],
2813 pub top_self: VALUE,
2814 pub load_path: VALUE,
2815 pub loaded_features: VALUE,
2816 pub loading_table: *mut st_table,
2817 pub trap_list: [rb_vm_struct__bindgen_ty_1; 65usize],
2818 pub event_hooks: *mut rb_event_hook_t,
2819 pub src_encoding_index: ::std::os::raw::c_int,
2820 pub verbose: VALUE,
2821 pub debug: VALUE,
2822 pub progname: VALUE,
2823 pub coverages: VALUE,
2824 pub unlinked_method_entry_list: *mut unlinked_method_entry_list_entry,
2825 pub objspace: *mut rb_objspace,
2826}
2827#[repr(C)]
2828#[derive(Debug, Copy, Clone)]
2829pub struct rb_vm_struct__bindgen_ty_1 {
2830 pub cmd: VALUE,
2831 pub safe: ::std::os::raw::c_int,
2832}
2833#[test]
2834fn bindgen_test_layout_rb_vm_struct__bindgen_ty_1() {
2835 assert_eq!(
2836 ::std::mem::size_of::<rb_vm_struct__bindgen_ty_1>(),
2837 16usize,
2838 concat!("Size of: ", stringify!(rb_vm_struct__bindgen_ty_1))
2839 );
2840 assert_eq!(
2841 ::std::mem::align_of::<rb_vm_struct__bindgen_ty_1>(),
2842 8usize,
2843 concat!("Alignment of ", stringify!(rb_vm_struct__bindgen_ty_1))
2844 );
2845 assert_eq!(
2846 unsafe { &(*(::std::ptr::null::<rb_vm_struct__bindgen_ty_1>())).cmd as *const _ as usize },
2847 0usize,
2848 concat!(
2849 "Offset of field: ",
2850 stringify!(rb_vm_struct__bindgen_ty_1),
2851 "::",
2852 stringify!(cmd)
2853 )
2854 );
2855 assert_eq!(
2856 unsafe { &(*(::std::ptr::null::<rb_vm_struct__bindgen_ty_1>())).safe as *const _ as usize },
2857 8usize,
2858 concat!(
2859 "Offset of field: ",
2860 stringify!(rb_vm_struct__bindgen_ty_1),
2861 "::",
2862 stringify!(safe)
2863 )
2864 );
2865}
2866#[test]
2867fn bindgen_test_layout_rb_vm_struct() {
2868 assert_eq!(
2869 ::std::mem::size_of::<rb_vm_struct>(),
2870 1272usize,
2871 concat!("Size of: ", stringify!(rb_vm_struct))
2872 );
2873 assert_eq!(
2874 ::std::mem::align_of::<rb_vm_struct>(),
2875 8usize,
2876 concat!("Alignment of ", stringify!(rb_vm_struct))
2877 );
2878 assert_eq!(
2879 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).self_ as *const _ as usize },
2880 0usize,
2881 concat!(
2882 "Offset of field: ",
2883 stringify!(rb_vm_struct),
2884 "::",
2885 stringify!(self_)
2886 )
2887 );
2888 assert_eq!(
2889 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).global_vm_lock as *const _ as usize },
2890 8usize,
2891 concat!(
2892 "Offset of field: ",
2893 stringify!(rb_vm_struct),
2894 "::",
2895 stringify!(global_vm_lock)
2896 )
2897 );
2898 assert_eq!(
2899 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).main_thread as *const _ as usize },
2900 48usize,
2901 concat!(
2902 "Offset of field: ",
2903 stringify!(rb_vm_struct),
2904 "::",
2905 stringify!(main_thread)
2906 )
2907 );
2908 assert_eq!(
2909 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).running_thread as *const _ as usize },
2910 56usize,
2911 concat!(
2912 "Offset of field: ",
2913 stringify!(rb_vm_struct),
2914 "::",
2915 stringify!(running_thread)
2916 )
2917 );
2918 assert_eq!(
2919 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).living_threads as *const _ as usize },
2920 64usize,
2921 concat!(
2922 "Offset of field: ",
2923 stringify!(rb_vm_struct),
2924 "::",
2925 stringify!(living_threads)
2926 )
2927 );
2928 assert_eq!(
2929 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).thgroup_default as *const _ as usize },
2930 72usize,
2931 concat!(
2932 "Offset of field: ",
2933 stringify!(rb_vm_struct),
2934 "::",
2935 stringify!(thgroup_default)
2936 )
2937 );
2938 assert_eq!(
2939 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).running as *const _ as usize },
2940 80usize,
2941 concat!(
2942 "Offset of field: ",
2943 stringify!(rb_vm_struct),
2944 "::",
2945 stringify!(running)
2946 )
2947 );
2948 assert_eq!(
2949 unsafe {
2950 &(*(::std::ptr::null::<rb_vm_struct>())).thread_abort_on_exception as *const _ as usize
2951 },
2952 84usize,
2953 concat!(
2954 "Offset of field: ",
2955 stringify!(rb_vm_struct),
2956 "::",
2957 stringify!(thread_abort_on_exception)
2958 )
2959 );
2960 assert_eq!(
2961 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).trace_flag as *const _ as usize },
2962 88usize,
2963 concat!(
2964 "Offset of field: ",
2965 stringify!(rb_vm_struct),
2966 "::",
2967 stringify!(trace_flag)
2968 )
2969 );
2970 assert_eq!(
2971 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).sleeper as *const _ as usize },
2972 96usize,
2973 concat!(
2974 "Offset of field: ",
2975 stringify!(rb_vm_struct),
2976 "::",
2977 stringify!(sleeper)
2978 )
2979 );
2980 assert_eq!(
2981 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).mark_object_ary as *const _ as usize },
2982 104usize,
2983 concat!(
2984 "Offset of field: ",
2985 stringify!(rb_vm_struct),
2986 "::",
2987 stringify!(mark_object_ary)
2988 )
2989 );
2990 assert_eq!(
2991 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).special_exceptions as *const _ as usize },
2992 112usize,
2993 concat!(
2994 "Offset of field: ",
2995 stringify!(rb_vm_struct),
2996 "::",
2997 stringify!(special_exceptions)
2998 )
2999 );
3000 assert_eq!(
3001 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).top_self as *const _ as usize },
3002 136usize,
3003 concat!(
3004 "Offset of field: ",
3005 stringify!(rb_vm_struct),
3006 "::",
3007 stringify!(top_self)
3008 )
3009 );
3010 assert_eq!(
3011 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).load_path as *const _ as usize },
3012 144usize,
3013 concat!(
3014 "Offset of field: ",
3015 stringify!(rb_vm_struct),
3016 "::",
3017 stringify!(load_path)
3018 )
3019 );
3020 assert_eq!(
3021 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).loaded_features as *const _ as usize },
3022 152usize,
3023 concat!(
3024 "Offset of field: ",
3025 stringify!(rb_vm_struct),
3026 "::",
3027 stringify!(loaded_features)
3028 )
3029 );
3030 assert_eq!(
3031 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).loading_table as *const _ as usize },
3032 160usize,
3033 concat!(
3034 "Offset of field: ",
3035 stringify!(rb_vm_struct),
3036 "::",
3037 stringify!(loading_table)
3038 )
3039 );
3040 assert_eq!(
3041 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).trap_list as *const _ as usize },
3042 168usize,
3043 concat!(
3044 "Offset of field: ",
3045 stringify!(rb_vm_struct),
3046 "::",
3047 stringify!(trap_list)
3048 )
3049 );
3050 assert_eq!(
3051 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).event_hooks as *const _ as usize },
3052 1208usize,
3053 concat!(
3054 "Offset of field: ",
3055 stringify!(rb_vm_struct),
3056 "::",
3057 stringify!(event_hooks)
3058 )
3059 );
3060 assert_eq!(
3061 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).src_encoding_index as *const _ as usize },
3062 1216usize,
3063 concat!(
3064 "Offset of field: ",
3065 stringify!(rb_vm_struct),
3066 "::",
3067 stringify!(src_encoding_index)
3068 )
3069 );
3070 assert_eq!(
3071 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).verbose as *const _ as usize },
3072 1224usize,
3073 concat!(
3074 "Offset of field: ",
3075 stringify!(rb_vm_struct),
3076 "::",
3077 stringify!(verbose)
3078 )
3079 );
3080 assert_eq!(
3081 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).debug as *const _ as usize },
3082 1232usize,
3083 concat!(
3084 "Offset of field: ",
3085 stringify!(rb_vm_struct),
3086 "::",
3087 stringify!(debug)
3088 )
3089 );
3090 assert_eq!(
3091 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).progname as *const _ as usize },
3092 1240usize,
3093 concat!(
3094 "Offset of field: ",
3095 stringify!(rb_vm_struct),
3096 "::",
3097 stringify!(progname)
3098 )
3099 );
3100 assert_eq!(
3101 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).coverages as *const _ as usize },
3102 1248usize,
3103 concat!(
3104 "Offset of field: ",
3105 stringify!(rb_vm_struct),
3106 "::",
3107 stringify!(coverages)
3108 )
3109 );
3110 assert_eq!(
3111 unsafe {
3112 &(*(::std::ptr::null::<rb_vm_struct>())).unlinked_method_entry_list as *const _ as usize
3113 },
3114 1256usize,
3115 concat!(
3116 "Offset of field: ",
3117 stringify!(rb_vm_struct),
3118 "::",
3119 stringify!(unlinked_method_entry_list)
3120 )
3121 );
3122 assert_eq!(
3123 unsafe { &(*(::std::ptr::null::<rb_vm_struct>())).objspace as *const _ as usize },
3124 1264usize,
3125 concat!(
3126 "Offset of field: ",
3127 stringify!(rb_vm_struct),
3128 "::",
3129 stringify!(objspace)
3130 )
3131 );
3132}
3133impl ::std::fmt::Debug for rb_vm_struct {
3134 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
3135 write ! ( f , "rb_vm_struct {{ self: {:?}, global_vm_lock: {:?}, main_thread: {:?}, running_thread: {:?}, living_threads: {:?}, thgroup_default: {:?}, running: {:?}, thread_abort_on_exception: {:?}, trace_flag: {:?}, sleeper: {:?}, mark_object_ary: {:?}, special_exceptions: {:?}, top_self: {:?}, load_path: {:?}, loaded_features: {:?}, loading_table: {:?}, trap_list: [{}], event_hooks: {:?}, src_encoding_index: {:?}, verbose: {:?}, debug: {:?}, progname: {:?}, coverages: {:?}, unlinked_method_entry_list: {:?}, objspace: {:?} }}" , self . self_ , self . global_vm_lock , self . main_thread , self . running_thread , self . living_threads , self . thgroup_default , self . running , self . thread_abort_on_exception , self . trace_flag , self . sleeper , self . mark_object_ary , self . special_exceptions , self . top_self , self . load_path , self . loaded_features , self . loading_table , self . trap_list . iter ( ) . enumerate ( ) . map ( | ( i , v ) | format ! ( "{}{:?}" , if i > 0 { ", " } else { "" } , v ) ) . collect :: < String > ( ) , self . event_hooks , self . src_encoding_index , self . verbose , self . debug , self . progname , self . coverages , self . unlinked_method_entry_list , self . objspace )
3136 }
3137}
3138pub type rb_vm_t = rb_vm_struct;
3139#[repr(C)]
3140#[derive(Debug, Copy, Clone)]
3141pub struct rb_control_frame_t {
3142 pub pc: *mut VALUE,
3143 pub sp: *mut VALUE,
3144 pub bp: *mut VALUE,
3145 pub iseq: *mut rb_iseq_t,
3146 pub flag: VALUE,
3147 pub self_: VALUE,
3148 pub lfp: *mut VALUE,
3149 pub dfp: *mut VALUE,
3150 pub block_iseq: *mut rb_iseq_t,
3151 pub proc_: VALUE,
3152 pub me: *const rb_method_entry_t,
3153}
3154#[test]
3155fn bindgen_test_layout_rb_control_frame_t() {
3156 assert_eq!(
3157 ::std::mem::size_of::<rb_control_frame_t>(),
3158 88usize,
3159 concat!("Size of: ", stringify!(rb_control_frame_t))
3160 );
3161 assert_eq!(
3162 ::std::mem::align_of::<rb_control_frame_t>(),
3163 8usize,
3164 concat!("Alignment of ", stringify!(rb_control_frame_t))
3165 );
3166 assert_eq!(
3167 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).pc as *const _ as usize },
3168 0usize,
3169 concat!(
3170 "Offset of field: ",
3171 stringify!(rb_control_frame_t),
3172 "::",
3173 stringify!(pc)
3174 )
3175 );
3176 assert_eq!(
3177 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).sp as *const _ as usize },
3178 8usize,
3179 concat!(
3180 "Offset of field: ",
3181 stringify!(rb_control_frame_t),
3182 "::",
3183 stringify!(sp)
3184 )
3185 );
3186 assert_eq!(
3187 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).bp as *const _ as usize },
3188 16usize,
3189 concat!(
3190 "Offset of field: ",
3191 stringify!(rb_control_frame_t),
3192 "::",
3193 stringify!(bp)
3194 )
3195 );
3196 assert_eq!(
3197 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).iseq as *const _ as usize },
3198 24usize,
3199 concat!(
3200 "Offset of field: ",
3201 stringify!(rb_control_frame_t),
3202 "::",
3203 stringify!(iseq)
3204 )
3205 );
3206 assert_eq!(
3207 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).flag as *const _ as usize },
3208 32usize,
3209 concat!(
3210 "Offset of field: ",
3211 stringify!(rb_control_frame_t),
3212 "::",
3213 stringify!(flag)
3214 )
3215 );
3216 assert_eq!(
3217 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).self_ as *const _ as usize },
3218 40usize,
3219 concat!(
3220 "Offset of field: ",
3221 stringify!(rb_control_frame_t),
3222 "::",
3223 stringify!(self_)
3224 )
3225 );
3226 assert_eq!(
3227 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).lfp as *const _ as usize },
3228 48usize,
3229 concat!(
3230 "Offset of field: ",
3231 stringify!(rb_control_frame_t),
3232 "::",
3233 stringify!(lfp)
3234 )
3235 );
3236 assert_eq!(
3237 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).dfp as *const _ as usize },
3238 56usize,
3239 concat!(
3240 "Offset of field: ",
3241 stringify!(rb_control_frame_t),
3242 "::",
3243 stringify!(dfp)
3244 )
3245 );
3246 assert_eq!(
3247 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).block_iseq as *const _ as usize },
3248 64usize,
3249 concat!(
3250 "Offset of field: ",
3251 stringify!(rb_control_frame_t),
3252 "::",
3253 stringify!(block_iseq)
3254 )
3255 );
3256 assert_eq!(
3257 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).proc_ as *const _ as usize },
3258 72usize,
3259 concat!(
3260 "Offset of field: ",
3261 stringify!(rb_control_frame_t),
3262 "::",
3263 stringify!(proc_)
3264 )
3265 );
3266 assert_eq!(
3267 unsafe { &(*(::std::ptr::null::<rb_control_frame_t>())).me as *const _ as usize },
3268 80usize,
3269 concat!(
3270 "Offset of field: ",
3271 stringify!(rb_control_frame_t),
3272 "::",
3273 stringify!(me)
3274 )
3275 );
3276}
3277#[repr(C)]
3278#[derive(Debug, Copy, Clone)]
3279pub struct rb_block_struct {
3280 pub self_: VALUE,
3281 pub lfp: *mut VALUE,
3282 pub dfp: *mut VALUE,
3283 pub iseq: *mut rb_iseq_t,
3284 pub proc_: VALUE,
3285}
3286#[test]
3287fn bindgen_test_layout_rb_block_struct() {
3288 assert_eq!(
3289 ::std::mem::size_of::<rb_block_struct>(),
3290 40usize,
3291 concat!("Size of: ", stringify!(rb_block_struct))
3292 );
3293 assert_eq!(
3294 ::std::mem::align_of::<rb_block_struct>(),
3295 8usize,
3296 concat!("Alignment of ", stringify!(rb_block_struct))
3297 );
3298 assert_eq!(
3299 unsafe { &(*(::std::ptr::null::<rb_block_struct>())).self_ as *const _ as usize },
3300 0usize,
3301 concat!(
3302 "Offset of field: ",
3303 stringify!(rb_block_struct),
3304 "::",
3305 stringify!(self_)
3306 )
3307 );
3308 assert_eq!(
3309 unsafe { &(*(::std::ptr::null::<rb_block_struct>())).lfp as *const _ as usize },
3310 8usize,
3311 concat!(
3312 "Offset of field: ",
3313 stringify!(rb_block_struct),
3314 "::",
3315 stringify!(lfp)
3316 )
3317 );
3318 assert_eq!(
3319 unsafe { &(*(::std::ptr::null::<rb_block_struct>())).dfp as *const _ as usize },
3320 16usize,
3321 concat!(
3322 "Offset of field: ",
3323 stringify!(rb_block_struct),
3324 "::",
3325 stringify!(dfp)
3326 )
3327 );
3328 assert_eq!(
3329 unsafe { &(*(::std::ptr::null::<rb_block_struct>())).iseq as *const _ as usize },
3330 24usize,
3331 concat!(
3332 "Offset of field: ",
3333 stringify!(rb_block_struct),
3334 "::",
3335 stringify!(iseq)
3336 )
3337 );
3338 assert_eq!(
3339 unsafe { &(*(::std::ptr::null::<rb_block_struct>())).proc_ as *const _ as usize },
3340 32usize,
3341 concat!(
3342 "Offset of field: ",
3343 stringify!(rb_block_struct),
3344 "::",
3345 stringify!(proc_)
3346 )
3347 );
3348}
3349pub type rb_block_t = rb_block_struct;
3350pub const rb_thread_status_THREAD_TO_KILL: rb_thread_status = 0;
3351pub const rb_thread_status_THREAD_RUNNABLE: rb_thread_status = 1;
3352pub const rb_thread_status_THREAD_STOPPED: rb_thread_status = 2;
3353pub const rb_thread_status_THREAD_STOPPED_FOREVER: rb_thread_status = 3;
3354pub const rb_thread_status_THREAD_KILLED: rb_thread_status = 4;
3355pub type rb_thread_status = ::std::os::raw::c_uint;
3356pub type rb_jmpbuf_t = jmp_buf;
3357#[repr(C)]
3358#[derive(Debug, Copy, Clone)]
3359pub struct rb_vm_tag {
3360 pub buf: rb_jmpbuf_t,
3361 pub tag: VALUE,
3362 pub retval: VALUE,
3363 pub prev: *mut rb_vm_tag,
3364}
3365#[test]
3366fn bindgen_test_layout_rb_vm_tag() {
3367 assert_eq!(
3368 ::std::mem::size_of::<rb_vm_tag>(),
3369 224usize,
3370 concat!("Size of: ", stringify!(rb_vm_tag))
3371 );
3372 assert_eq!(
3373 ::std::mem::align_of::<rb_vm_tag>(),
3374 8usize,
3375 concat!("Alignment of ", stringify!(rb_vm_tag))
3376 );
3377 assert_eq!(
3378 unsafe { &(*(::std::ptr::null::<rb_vm_tag>())).buf as *const _ as usize },
3379 0usize,
3380 concat!(
3381 "Offset of field: ",
3382 stringify!(rb_vm_tag),
3383 "::",
3384 stringify!(buf)
3385 )
3386 );
3387 assert_eq!(
3388 unsafe { &(*(::std::ptr::null::<rb_vm_tag>())).tag as *const _ as usize },
3389 200usize,
3390 concat!(
3391 "Offset of field: ",
3392 stringify!(rb_vm_tag),
3393 "::",
3394 stringify!(tag)
3395 )
3396 );
3397 assert_eq!(
3398 unsafe { &(*(::std::ptr::null::<rb_vm_tag>())).retval as *const _ as usize },
3399 208usize,
3400 concat!(
3401 "Offset of field: ",
3402 stringify!(rb_vm_tag),
3403 "::",
3404 stringify!(retval)
3405 )
3406 );
3407 assert_eq!(
3408 unsafe { &(*(::std::ptr::null::<rb_vm_tag>())).prev as *const _ as usize },
3409 216usize,
3410 concat!(
3411 "Offset of field: ",
3412 stringify!(rb_vm_tag),
3413 "::",
3414 stringify!(prev)
3415 )
3416 );
3417}
3418#[repr(C)]
3419#[derive(Debug, Copy, Clone)]
3420pub struct rb_vm_protect_tag {
3421 pub prev: *mut rb_vm_protect_tag,
3422}
3423#[test]
3424fn bindgen_test_layout_rb_vm_protect_tag() {
3425 assert_eq!(
3426 ::std::mem::size_of::<rb_vm_protect_tag>(),
3427 8usize,
3428 concat!("Size of: ", stringify!(rb_vm_protect_tag))
3429 );
3430 assert_eq!(
3431 ::std::mem::align_of::<rb_vm_protect_tag>(),
3432 8usize,
3433 concat!("Alignment of ", stringify!(rb_vm_protect_tag))
3434 );
3435 assert_eq!(
3436 unsafe { &(*(::std::ptr::null::<rb_vm_protect_tag>())).prev as *const _ as usize },
3437 0usize,
3438 concat!(
3439 "Offset of field: ",
3440 stringify!(rb_vm_protect_tag),
3441 "::",
3442 stringify!(prev)
3443 )
3444 );
3445}
3446#[repr(C)]
3447#[derive(Debug, Copy, Clone)]
3448pub struct rb_unblock_callback {
3449 pub func: rb_unblock_function_t,
3450 pub arg: *mut ::std::os::raw::c_void,
3451}
3452#[test]
3453fn bindgen_test_layout_rb_unblock_callback() {
3454 assert_eq!(
3455 ::std::mem::size_of::<rb_unblock_callback>(),
3456 16usize,
3457 concat!("Size of: ", stringify!(rb_unblock_callback))
3458 );
3459 assert_eq!(
3460 ::std::mem::align_of::<rb_unblock_callback>(),
3461 8usize,
3462 concat!("Alignment of ", stringify!(rb_unblock_callback))
3463 );
3464 assert_eq!(
3465 unsafe { &(*(::std::ptr::null::<rb_unblock_callback>())).func as *const _ as usize },
3466 0usize,
3467 concat!(
3468 "Offset of field: ",
3469 stringify!(rb_unblock_callback),
3470 "::",
3471 stringify!(func)
3472 )
3473 );
3474 assert_eq!(
3475 unsafe { &(*(::std::ptr::null::<rb_unblock_callback>())).arg as *const _ as usize },
3476 8usize,
3477 concat!(
3478 "Offset of field: ",
3479 stringify!(rb_unblock_callback),
3480 "::",
3481 stringify!(arg)
3482 )
3483 );
3484}
3485#[repr(C)]
3486#[derive(Debug, Copy, Clone)]
3487pub struct rb_mutex_struct {
3488 _unused: [u8; 0],
3489}
3490#[repr(C)]
3491#[derive(Copy, Clone)]
3492pub struct rb_thread_struct {
3493 pub self_: VALUE,
3494 pub vm: *mut rb_vm_t,
3495 pub stack: *mut VALUE,
3496 pub stack_size: ::std::os::raw::c_ulong,
3497 pub cfp: *mut rb_control_frame_t,
3498 pub safe_level: ::std::os::raw::c_int,
3499 pub raised_flag: ::std::os::raw::c_int,
3500 pub last_status: VALUE,
3501 pub state: ::std::os::raw::c_int,
3502 pub passed_block: *const rb_block_t,
3503 pub passed_me: *const rb_method_entry_t,
3504 pub top_self: VALUE,
3505 pub top_wrapper: VALUE,
3506 pub base_block: *mut rb_block_t,
3507 pub local_lfp: *mut VALUE,
3508 pub local_svar: VALUE,
3509 pub thread_id: rb_thread_id_t,
3510 pub status: rb_thread_status,
3511 pub priority: ::std::os::raw::c_int,
3512 pub slice: ::std::os::raw::c_int,
3513 pub native_thread_data: native_thread_data_t,
3514 pub blocking_region_buffer: *mut ::std::os::raw::c_void,
3515 pub thgroup: VALUE,
3516 pub value: VALUE,
3517 pub errinfo: VALUE,
3518 pub thrown_errinfo: VALUE,
3519 pub exec_signal: ::std::os::raw::c_int,
3520 pub interrupt_flag: ::std::os::raw::c_int,
3521 pub interrupt_lock: rb_thread_lock_t,
3522 pub unblock: rb_unblock_callback,
3523 pub locking_mutex: VALUE,
3524 pub keeping_mutexes: *mut rb_mutex_struct,
3525 pub transition_for_lock: ::std::os::raw::c_int,
3526 pub tag: *mut rb_vm_tag,
3527 pub protect_tag: *mut rb_vm_protect_tag,
3528 pub parse_in_eval: ::std::os::raw::c_int,
3529 pub mild_compile_error: ::std::os::raw::c_int,
3530 pub local_storage: *mut st_table,
3531 pub join_list_next: *mut rb_thread_struct,
3532 pub join_list_head: *mut rb_thread_struct,
3533 pub first_proc: VALUE,
3534 pub first_args: VALUE,
3535 pub first_func: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
3536 pub machine_stack_start: *mut VALUE,
3537 pub machine_stack_end: *mut VALUE,
3538 pub machine_stack_maxsize: usize,
3539 pub machine_regs: jmp_buf,
3540 pub mark_stack_len: ::std::os::raw::c_int,
3541 pub stat_insn_usage: VALUE,
3542 pub event_hooks: *mut rb_event_hook_t,
3543 pub event_flags: rb_event_flag_t,
3544 pub tracing: ::std::os::raw::c_int,
3545 pub fiber: VALUE,
3546 pub root_fiber: VALUE,
3547 pub root_jmpbuf: rb_jmpbuf_t,
3548 pub method_missing_reason: ::std::os::raw::c_int,
3549 pub abort_on_exception: ::std::os::raw::c_int,
3550 pub altstack: *mut ::std::os::raw::c_void,
3551}
3552#[test]
3553fn bindgen_test_layout_rb_thread_struct() {
3554 assert_eq!(
3555 ::std::mem::size_of::<rb_thread_struct>(),
3556 888usize,
3557 concat!("Size of: ", stringify!(rb_thread_struct))
3558 );
3559 assert_eq!(
3560 ::std::mem::align_of::<rb_thread_struct>(),
3561 8usize,
3562 concat!("Alignment of ", stringify!(rb_thread_struct))
3563 );
3564 assert_eq!(
3565 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).self_ as *const _ as usize },
3566 0usize,
3567 concat!(
3568 "Offset of field: ",
3569 stringify!(rb_thread_struct),
3570 "::",
3571 stringify!(self_)
3572 )
3573 );
3574 assert_eq!(
3575 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).vm as *const _ as usize },
3576 8usize,
3577 concat!(
3578 "Offset of field: ",
3579 stringify!(rb_thread_struct),
3580 "::",
3581 stringify!(vm)
3582 )
3583 );
3584 assert_eq!(
3585 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).stack as *const _ as usize },
3586 16usize,
3587 concat!(
3588 "Offset of field: ",
3589 stringify!(rb_thread_struct),
3590 "::",
3591 stringify!(stack)
3592 )
3593 );
3594 assert_eq!(
3595 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).stack_size as *const _ as usize },
3596 24usize,
3597 concat!(
3598 "Offset of field: ",
3599 stringify!(rb_thread_struct),
3600 "::",
3601 stringify!(stack_size)
3602 )
3603 );
3604 assert_eq!(
3605 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).cfp as *const _ as usize },
3606 32usize,
3607 concat!(
3608 "Offset of field: ",
3609 stringify!(rb_thread_struct),
3610 "::",
3611 stringify!(cfp)
3612 )
3613 );
3614 assert_eq!(
3615 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).safe_level as *const _ as usize },
3616 40usize,
3617 concat!(
3618 "Offset of field: ",
3619 stringify!(rb_thread_struct),
3620 "::",
3621 stringify!(safe_level)
3622 )
3623 );
3624 assert_eq!(
3625 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).raised_flag as *const _ as usize },
3626 44usize,
3627 concat!(
3628 "Offset of field: ",
3629 stringify!(rb_thread_struct),
3630 "::",
3631 stringify!(raised_flag)
3632 )
3633 );
3634 assert_eq!(
3635 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).last_status as *const _ as usize },
3636 48usize,
3637 concat!(
3638 "Offset of field: ",
3639 stringify!(rb_thread_struct),
3640 "::",
3641 stringify!(last_status)
3642 )
3643 );
3644 assert_eq!(
3645 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).state as *const _ as usize },
3646 56usize,
3647 concat!(
3648 "Offset of field: ",
3649 stringify!(rb_thread_struct),
3650 "::",
3651 stringify!(state)
3652 )
3653 );
3654 assert_eq!(
3655 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).passed_block as *const _ as usize },
3656 64usize,
3657 concat!(
3658 "Offset of field: ",
3659 stringify!(rb_thread_struct),
3660 "::",
3661 stringify!(passed_block)
3662 )
3663 );
3664 assert_eq!(
3665 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).passed_me as *const _ as usize },
3666 72usize,
3667 concat!(
3668 "Offset of field: ",
3669 stringify!(rb_thread_struct),
3670 "::",
3671 stringify!(passed_me)
3672 )
3673 );
3674 assert_eq!(
3675 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).top_self as *const _ as usize },
3676 80usize,
3677 concat!(
3678 "Offset of field: ",
3679 stringify!(rb_thread_struct),
3680 "::",
3681 stringify!(top_self)
3682 )
3683 );
3684 assert_eq!(
3685 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).top_wrapper as *const _ as usize },
3686 88usize,
3687 concat!(
3688 "Offset of field: ",
3689 stringify!(rb_thread_struct),
3690 "::",
3691 stringify!(top_wrapper)
3692 )
3693 );
3694 assert_eq!(
3695 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).base_block as *const _ as usize },
3696 96usize,
3697 concat!(
3698 "Offset of field: ",
3699 stringify!(rb_thread_struct),
3700 "::",
3701 stringify!(base_block)
3702 )
3703 );
3704 assert_eq!(
3705 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).local_lfp as *const _ as usize },
3706 104usize,
3707 concat!(
3708 "Offset of field: ",
3709 stringify!(rb_thread_struct),
3710 "::",
3711 stringify!(local_lfp)
3712 )
3713 );
3714 assert_eq!(
3715 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).local_svar as *const _ as usize },
3716 112usize,
3717 concat!(
3718 "Offset of field: ",
3719 stringify!(rb_thread_struct),
3720 "::",
3721 stringify!(local_svar)
3722 )
3723 );
3724 assert_eq!(
3725 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).thread_id as *const _ as usize },
3726 120usize,
3727 concat!(
3728 "Offset of field: ",
3729 stringify!(rb_thread_struct),
3730 "::",
3731 stringify!(thread_id)
3732 )
3733 );
3734 assert_eq!(
3735 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).status as *const _ as usize },
3736 128usize,
3737 concat!(
3738 "Offset of field: ",
3739 stringify!(rb_thread_struct),
3740 "::",
3741 stringify!(status)
3742 )
3743 );
3744 assert_eq!(
3745 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).priority as *const _ as usize },
3746 132usize,
3747 concat!(
3748 "Offset of field: ",
3749 stringify!(rb_thread_struct),
3750 "::",
3751 stringify!(priority)
3752 )
3753 );
3754 assert_eq!(
3755 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).slice as *const _ as usize },
3756 136usize,
3757 concat!(
3758 "Offset of field: ",
3759 stringify!(rb_thread_struct),
3760 "::",
3761 stringify!(slice)
3762 )
3763 );
3764 assert_eq!(
3765 unsafe {
3766 &(*(::std::ptr::null::<rb_thread_struct>())).native_thread_data as *const _ as usize
3767 },
3768 144usize,
3769 concat!(
3770 "Offset of field: ",
3771 stringify!(rb_thread_struct),
3772 "::",
3773 stringify!(native_thread_data)
3774 )
3775 );
3776 assert_eq!(
3777 unsafe {
3778 &(*(::std::ptr::null::<rb_thread_struct>())).blocking_region_buffer as *const _ as usize
3779 },
3780 200usize,
3781 concat!(
3782 "Offset of field: ",
3783 stringify!(rb_thread_struct),
3784 "::",
3785 stringify!(blocking_region_buffer)
3786 )
3787 );
3788 assert_eq!(
3789 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).thgroup as *const _ as usize },
3790 208usize,
3791 concat!(
3792 "Offset of field: ",
3793 stringify!(rb_thread_struct),
3794 "::",
3795 stringify!(thgroup)
3796 )
3797 );
3798 assert_eq!(
3799 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).value as *const _ as usize },
3800 216usize,
3801 concat!(
3802 "Offset of field: ",
3803 stringify!(rb_thread_struct),
3804 "::",
3805 stringify!(value)
3806 )
3807 );
3808 assert_eq!(
3809 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).errinfo as *const _ as usize },
3810 224usize,
3811 concat!(
3812 "Offset of field: ",
3813 stringify!(rb_thread_struct),
3814 "::",
3815 stringify!(errinfo)
3816 )
3817 );
3818 assert_eq!(
3819 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).thrown_errinfo as *const _ as usize },
3820 232usize,
3821 concat!(
3822 "Offset of field: ",
3823 stringify!(rb_thread_struct),
3824 "::",
3825 stringify!(thrown_errinfo)
3826 )
3827 );
3828 assert_eq!(
3829 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).exec_signal as *const _ as usize },
3830 240usize,
3831 concat!(
3832 "Offset of field: ",
3833 stringify!(rb_thread_struct),
3834 "::",
3835 stringify!(exec_signal)
3836 )
3837 );
3838 assert_eq!(
3839 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).interrupt_flag as *const _ as usize },
3840 244usize,
3841 concat!(
3842 "Offset of field: ",
3843 stringify!(rb_thread_struct),
3844 "::",
3845 stringify!(interrupt_flag)
3846 )
3847 );
3848 assert_eq!(
3849 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).interrupt_lock as *const _ as usize },
3850 248usize,
3851 concat!(
3852 "Offset of field: ",
3853 stringify!(rb_thread_struct),
3854 "::",
3855 stringify!(interrupt_lock)
3856 )
3857 );
3858 assert_eq!(
3859 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).unblock as *const _ as usize },
3860 288usize,
3861 concat!(
3862 "Offset of field: ",
3863 stringify!(rb_thread_struct),
3864 "::",
3865 stringify!(unblock)
3866 )
3867 );
3868 assert_eq!(
3869 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).locking_mutex as *const _ as usize },
3870 304usize,
3871 concat!(
3872 "Offset of field: ",
3873 stringify!(rb_thread_struct),
3874 "::",
3875 stringify!(locking_mutex)
3876 )
3877 );
3878 assert_eq!(
3879 unsafe {
3880 &(*(::std::ptr::null::<rb_thread_struct>())).keeping_mutexes as *const _ as usize
3881 },
3882 312usize,
3883 concat!(
3884 "Offset of field: ",
3885 stringify!(rb_thread_struct),
3886 "::",
3887 stringify!(keeping_mutexes)
3888 )
3889 );
3890 assert_eq!(
3891 unsafe {
3892 &(*(::std::ptr::null::<rb_thread_struct>())).transition_for_lock as *const _ as usize
3893 },
3894 320usize,
3895 concat!(
3896 "Offset of field: ",
3897 stringify!(rb_thread_struct),
3898 "::",
3899 stringify!(transition_for_lock)
3900 )
3901 );
3902 assert_eq!(
3903 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).tag as *const _ as usize },
3904 328usize,
3905 concat!(
3906 "Offset of field: ",
3907 stringify!(rb_thread_struct),
3908 "::",
3909 stringify!(tag)
3910 )
3911 );
3912 assert_eq!(
3913 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).protect_tag as *const _ as usize },
3914 336usize,
3915 concat!(
3916 "Offset of field: ",
3917 stringify!(rb_thread_struct),
3918 "::",
3919 stringify!(protect_tag)
3920 )
3921 );
3922 assert_eq!(
3923 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).parse_in_eval as *const _ as usize },
3924 344usize,
3925 concat!(
3926 "Offset of field: ",
3927 stringify!(rb_thread_struct),
3928 "::",
3929 stringify!(parse_in_eval)
3930 )
3931 );
3932 assert_eq!(
3933 unsafe {
3934 &(*(::std::ptr::null::<rb_thread_struct>())).mild_compile_error as *const _ as usize
3935 },
3936 348usize,
3937 concat!(
3938 "Offset of field: ",
3939 stringify!(rb_thread_struct),
3940 "::",
3941 stringify!(mild_compile_error)
3942 )
3943 );
3944 assert_eq!(
3945 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).local_storage as *const _ as usize },
3946 352usize,
3947 concat!(
3948 "Offset of field: ",
3949 stringify!(rb_thread_struct),
3950 "::",
3951 stringify!(local_storage)
3952 )
3953 );
3954 assert_eq!(
3955 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).join_list_next as *const _ as usize },
3956 360usize,
3957 concat!(
3958 "Offset of field: ",
3959 stringify!(rb_thread_struct),
3960 "::",
3961 stringify!(join_list_next)
3962 )
3963 );
3964 assert_eq!(
3965 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).join_list_head as *const _ as usize },
3966 368usize,
3967 concat!(
3968 "Offset of field: ",
3969 stringify!(rb_thread_struct),
3970 "::",
3971 stringify!(join_list_head)
3972 )
3973 );
3974 assert_eq!(
3975 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).first_proc as *const _ as usize },
3976 376usize,
3977 concat!(
3978 "Offset of field: ",
3979 stringify!(rb_thread_struct),
3980 "::",
3981 stringify!(first_proc)
3982 )
3983 );
3984 assert_eq!(
3985 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).first_args as *const _ as usize },
3986 384usize,
3987 concat!(
3988 "Offset of field: ",
3989 stringify!(rb_thread_struct),
3990 "::",
3991 stringify!(first_args)
3992 )
3993 );
3994 assert_eq!(
3995 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).first_func as *const _ as usize },
3996 392usize,
3997 concat!(
3998 "Offset of field: ",
3999 stringify!(rb_thread_struct),
4000 "::",
4001 stringify!(first_func)
4002 )
4003 );
4004 assert_eq!(
4005 unsafe {
4006 &(*(::std::ptr::null::<rb_thread_struct>())).machine_stack_start as *const _ as usize
4007 },
4008 400usize,
4009 concat!(
4010 "Offset of field: ",
4011 stringify!(rb_thread_struct),
4012 "::",
4013 stringify!(machine_stack_start)
4014 )
4015 );
4016 assert_eq!(
4017 unsafe {
4018 &(*(::std::ptr::null::<rb_thread_struct>())).machine_stack_end as *const _ as usize
4019 },
4020 408usize,
4021 concat!(
4022 "Offset of field: ",
4023 stringify!(rb_thread_struct),
4024 "::",
4025 stringify!(machine_stack_end)
4026 )
4027 );
4028 assert_eq!(
4029 unsafe {
4030 &(*(::std::ptr::null::<rb_thread_struct>())).machine_stack_maxsize as *const _ as usize
4031 },
4032 416usize,
4033 concat!(
4034 "Offset of field: ",
4035 stringify!(rb_thread_struct),
4036 "::",
4037 stringify!(machine_stack_maxsize)
4038 )
4039 );
4040 assert_eq!(
4041 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).machine_regs as *const _ as usize },
4042 424usize,
4043 concat!(
4044 "Offset of field: ",
4045 stringify!(rb_thread_struct),
4046 "::",
4047 stringify!(machine_regs)
4048 )
4049 );
4050 assert_eq!(
4051 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).mark_stack_len as *const _ as usize },
4052 624usize,
4053 concat!(
4054 "Offset of field: ",
4055 stringify!(rb_thread_struct),
4056 "::",
4057 stringify!(mark_stack_len)
4058 )
4059 );
4060 assert_eq!(
4061 unsafe {
4062 &(*(::std::ptr::null::<rb_thread_struct>())).stat_insn_usage as *const _ as usize
4063 },
4064 632usize,
4065 concat!(
4066 "Offset of field: ",
4067 stringify!(rb_thread_struct),
4068 "::",
4069 stringify!(stat_insn_usage)
4070 )
4071 );
4072 assert_eq!(
4073 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).event_hooks as *const _ as usize },
4074 640usize,
4075 concat!(
4076 "Offset of field: ",
4077 stringify!(rb_thread_struct),
4078 "::",
4079 stringify!(event_hooks)
4080 )
4081 );
4082 assert_eq!(
4083 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).event_flags as *const _ as usize },
4084 648usize,
4085 concat!(
4086 "Offset of field: ",
4087 stringify!(rb_thread_struct),
4088 "::",
4089 stringify!(event_flags)
4090 )
4091 );
4092 assert_eq!(
4093 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).tracing as *const _ as usize },
4094 652usize,
4095 concat!(
4096 "Offset of field: ",
4097 stringify!(rb_thread_struct),
4098 "::",
4099 stringify!(tracing)
4100 )
4101 );
4102 assert_eq!(
4103 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).fiber as *const _ as usize },
4104 656usize,
4105 concat!(
4106 "Offset of field: ",
4107 stringify!(rb_thread_struct),
4108 "::",
4109 stringify!(fiber)
4110 )
4111 );
4112 assert_eq!(
4113 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).root_fiber as *const _ as usize },
4114 664usize,
4115 concat!(
4116 "Offset of field: ",
4117 stringify!(rb_thread_struct),
4118 "::",
4119 stringify!(root_fiber)
4120 )
4121 );
4122 assert_eq!(
4123 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).root_jmpbuf as *const _ as usize },
4124 672usize,
4125 concat!(
4126 "Offset of field: ",
4127 stringify!(rb_thread_struct),
4128 "::",
4129 stringify!(root_jmpbuf)
4130 )
4131 );
4132 assert_eq!(
4133 unsafe {
4134 &(*(::std::ptr::null::<rb_thread_struct>())).method_missing_reason as *const _ as usize
4135 },
4136 872usize,
4137 concat!(
4138 "Offset of field: ",
4139 stringify!(rb_thread_struct),
4140 "::",
4141 stringify!(method_missing_reason)
4142 )
4143 );
4144 assert_eq!(
4145 unsafe {
4146 &(*(::std::ptr::null::<rb_thread_struct>())).abort_on_exception as *const _ as usize
4147 },
4148 876usize,
4149 concat!(
4150 "Offset of field: ",
4151 stringify!(rb_thread_struct),
4152 "::",
4153 stringify!(abort_on_exception)
4154 )
4155 );
4156 assert_eq!(
4157 unsafe { &(*(::std::ptr::null::<rb_thread_struct>())).altstack as *const _ as usize },
4158 880usize,
4159 concat!(
4160 "Offset of field: ",
4161 stringify!(rb_thread_struct),
4162 "::",
4163 stringify!(altstack)
4164 )
4165 );
4166}
4167impl ::std::fmt::Debug for rb_thread_struct {
4168 fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {
4169 write ! ( f , "rb_thread_struct {{ self: {:?}, vm: {:?}, stack: {:?}, stack_size: {:?}, cfp: {:?}, safe_level: {:?}, raised_flag: {:?}, last_status: {:?}, state: {:?}, passed_block: {:?}, passed_me: {:?}, top_self: {:?}, top_wrapper: {:?}, base_block: {:?}, local_lfp: {:?}, local_svar: {:?}, thread_id: {:?}, status: {:?}, priority: {:?}, slice: {:?}, native_thread_data: {:?}, blocking_region_buffer: {:?}, thgroup: {:?}, value: {:?}, errinfo: {:?}, thrown_errinfo: {:?}, exec_signal: {:?}, interrupt_flag: {:?}, interrupt_lock: {:?}, unblock: {:?}, locking_mutex: {:?}, keeping_mutexes: {:?}, transition_for_lock: {:?}, tag: {:?}, protect_tag: {:?}, parse_in_eval: {:?}, mild_compile_error: {:?}, local_storage: {:?}, join_list_next: {:?}, join_list_head: {:?}, first_proc: {:?}, first_args: {:?}, first_func: {:?}, machine_stack_start: {:?}, machine_stack_end: {:?}, machine_stack_maxsize: {:?}, machine_regs: {:?}, mark_stack_len: {:?}, stat_insn_usage: {:?}, event_hooks: {:?}, event_flags: {:?}, tracing: {:?}, fiber: {:?}, root_fiber: {:?}, root_jmpbuf: {:?}, method_missing_reason: {:?}, abort_on_exception: {:?}, altstack: {:?} }}" , self . self_ , self . vm , self . stack , self . stack_size , self . cfp , self . safe_level , self . raised_flag , self . last_status , self . state , self . passed_block , self . passed_me , self . top_self , self . top_wrapper , self . base_block , self . local_lfp , self . local_svar , self . thread_id , self . status , self . priority , self . slice , self . native_thread_data , self . blocking_region_buffer , self . thgroup , self . value , self . errinfo , self . thrown_errinfo , self . exec_signal , self . interrupt_flag , self . interrupt_lock , self . unblock , self . locking_mutex , self . keeping_mutexes , self . transition_for_lock , self . tag , self . protect_tag , self . parse_in_eval , self . mild_compile_error , self . local_storage , self . join_list_next , self . join_list_head , self . first_proc , self . first_args , self . first_func , self . machine_stack_start , self . machine_stack_end , self . machine_stack_maxsize , self . machine_regs , self . mark_stack_len , self . stat_insn_usage , self . event_hooks , self . event_flags , self . tracing , self . fiber , self . root_fiber , self . root_jmpbuf , self . method_missing_reason , self . abort_on_exception , self . altstack )
4170 }
4171}
4172pub type rb_thread_t = rb_thread_struct;
4173#[repr(C)]
4174#[derive(Debug, Copy, Clone)]
4175pub struct iseq_insn_info_entry {
4176 pub position: ::std::os::raw::c_ushort,
4177 pub line_no: ::std::os::raw::c_ushort,
4178 pub sp: ::std::os::raw::c_ushort,
4179}
4180#[test]
4181fn bindgen_test_layout_iseq_insn_info_entry() {
4182 assert_eq!(
4183 ::std::mem::size_of::<iseq_insn_info_entry>(),
4184 6usize,
4185 concat!("Size of: ", stringify!(iseq_insn_info_entry))
4186 );
4187 assert_eq!(
4188 ::std::mem::align_of::<iseq_insn_info_entry>(),
4189 2usize,
4190 concat!("Alignment of ", stringify!(iseq_insn_info_entry))
4191 );
4192 assert_eq!(
4193 unsafe { &(*(::std::ptr::null::<iseq_insn_info_entry>())).position as *const _ as usize },
4194 0usize,
4195 concat!(
4196 "Offset of field: ",
4197 stringify!(iseq_insn_info_entry),
4198 "::",
4199 stringify!(position)
4200 )
4201 );
4202 assert_eq!(
4203 unsafe { &(*(::std::ptr::null::<iseq_insn_info_entry>())).line_no as *const _ as usize },
4204 2usize,
4205 concat!(
4206 "Offset of field: ",
4207 stringify!(iseq_insn_info_entry),
4208 "::",
4209 stringify!(line_no)
4210 )
4211 );
4212 assert_eq!(
4213 unsafe { &(*(::std::ptr::null::<iseq_insn_info_entry>())).sp as *const _ as usize },
4214 4usize,
4215 concat!(
4216 "Offset of field: ",
4217 stringify!(iseq_insn_info_entry),
4218 "::",
4219 stringify!(sp)
4220 )
4221 );
4222}
4223#[repr(C)]
4224#[derive(Debug, Copy, Clone)]
4225pub struct iseq_catch_table_entry {
4226 pub type_: VALUE,
4227 pub iseq: VALUE,
4228 pub start: ::std::os::raw::c_ulong,
4229 pub end: ::std::os::raw::c_ulong,
4230 pub cont: ::std::os::raw::c_ulong,
4231 pub sp: ::std::os::raw::c_ulong,
4232}
4233#[test]
4234fn bindgen_test_layout_iseq_catch_table_entry() {
4235 assert_eq!(
4236 ::std::mem::size_of::<iseq_catch_table_entry>(),
4237 48usize,
4238 concat!("Size of: ", stringify!(iseq_catch_table_entry))
4239 );
4240 assert_eq!(
4241 ::std::mem::align_of::<iseq_catch_table_entry>(),
4242 8usize,
4243 concat!("Alignment of ", stringify!(iseq_catch_table_entry))
4244 );
4245 assert_eq!(
4246 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).type_ as *const _ as usize },
4247 0usize,
4248 concat!(
4249 "Offset of field: ",
4250 stringify!(iseq_catch_table_entry),
4251 "::",
4252 stringify!(type_)
4253 )
4254 );
4255 assert_eq!(
4256 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).iseq as *const _ as usize },
4257 8usize,
4258 concat!(
4259 "Offset of field: ",
4260 stringify!(iseq_catch_table_entry),
4261 "::",
4262 stringify!(iseq)
4263 )
4264 );
4265 assert_eq!(
4266 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).start as *const _ as usize },
4267 16usize,
4268 concat!(
4269 "Offset of field: ",
4270 stringify!(iseq_catch_table_entry),
4271 "::",
4272 stringify!(start)
4273 )
4274 );
4275 assert_eq!(
4276 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).end as *const _ as usize },
4277 24usize,
4278 concat!(
4279 "Offset of field: ",
4280 stringify!(iseq_catch_table_entry),
4281 "::",
4282 stringify!(end)
4283 )
4284 );
4285 assert_eq!(
4286 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).cont as *const _ as usize },
4287 32usize,
4288 concat!(
4289 "Offset of field: ",
4290 stringify!(iseq_catch_table_entry),
4291 "::",
4292 stringify!(cont)
4293 )
4294 );
4295 assert_eq!(
4296 unsafe { &(*(::std::ptr::null::<iseq_catch_table_entry>())).sp as *const _ as usize },
4297 40usize,
4298 concat!(
4299 "Offset of field: ",
4300 stringify!(iseq_catch_table_entry),
4301 "::",
4302 stringify!(sp)
4303 )
4304 );
4305}
4306#[repr(C)]
4307#[derive(Debug, Copy, Clone)]
4308pub struct iseq_compile_data_storage {
4309 pub next: *mut iseq_compile_data_storage,
4310 pub pos: ::std::os::raw::c_ulong,
4311 pub size: ::std::os::raw::c_ulong,
4312 pub buff: *mut ::std::os::raw::c_char,
4313}
4314#[test]
4315fn bindgen_test_layout_iseq_compile_data_storage() {
4316 assert_eq!(
4317 ::std::mem::size_of::<iseq_compile_data_storage>(),
4318 32usize,
4319 concat!("Size of: ", stringify!(iseq_compile_data_storage))
4320 );
4321 assert_eq!(
4322 ::std::mem::align_of::<iseq_compile_data_storage>(),
4323 8usize,
4324 concat!("Alignment of ", stringify!(iseq_compile_data_storage))
4325 );
4326 assert_eq!(
4327 unsafe { &(*(::std::ptr::null::<iseq_compile_data_storage>())).next as *const _ as usize },
4328 0usize,
4329 concat!(
4330 "Offset of field: ",
4331 stringify!(iseq_compile_data_storage),
4332 "::",
4333 stringify!(next)
4334 )
4335 );
4336 assert_eq!(
4337 unsafe { &(*(::std::ptr::null::<iseq_compile_data_storage>())).pos as *const _ as usize },
4338 8usize,
4339 concat!(
4340 "Offset of field: ",
4341 stringify!(iseq_compile_data_storage),
4342 "::",
4343 stringify!(pos)
4344 )
4345 );
4346 assert_eq!(
4347 unsafe { &(*(::std::ptr::null::<iseq_compile_data_storage>())).size as *const _ as usize },
4348 16usize,
4349 concat!(
4350 "Offset of field: ",
4351 stringify!(iseq_compile_data_storage),
4352 "::",
4353 stringify!(size)
4354 )
4355 );
4356 assert_eq!(
4357 unsafe { &(*(::std::ptr::null::<iseq_compile_data_storage>())).buff as *const _ as usize },
4358 24usize,
4359 concat!(
4360 "Offset of field: ",
4361 stringify!(iseq_compile_data_storage),
4362 "::",
4363 stringify!(buff)
4364 )
4365 );
4366}
4367#[repr(C)]
4368#[derive(Debug, Copy, Clone)]
4369pub struct iseq_compile_data {
4370 pub err_info: VALUE,
4371 pub mark_ary: VALUE,
4372 pub catch_table_ary: VALUE,
4373 pub start_label: *mut iseq_label_data,
4374 pub end_label: *mut iseq_label_data,
4375 pub redo_label: *mut iseq_label_data,
4376 pub current_block: VALUE,
4377 pub ensure_node: VALUE,
4378 pub for_iseq: VALUE,
4379 pub ensure_node_stack: *mut iseq_compile_data_ensure_node_stack,
4380 pub loopval_popped: ::std::os::raw::c_int,
4381 pub cached_const: ::std::os::raw::c_int,
4382 pub storage_head: *mut iseq_compile_data_storage,
4383 pub storage_current: *mut iseq_compile_data_storage,
4384 pub last_line: ::std::os::raw::c_int,
4385 pub last_coverable_line: ::std::os::raw::c_int,
4386 pub flip_cnt: ::std::os::raw::c_int,
4387 pub label_no: ::std::os::raw::c_int,
4388 pub node_level: ::std::os::raw::c_int,
4389 pub option: *const rb_compile_option_t,
4390}
4391#[test]
4392fn bindgen_test_layout_iseq_compile_data() {
4393 assert_eq!(
4394 ::std::mem::size_of::<iseq_compile_data>(),
4395 136usize,
4396 concat!("Size of: ", stringify!(iseq_compile_data))
4397 );
4398 assert_eq!(
4399 ::std::mem::align_of::<iseq_compile_data>(),
4400 8usize,
4401 concat!("Alignment of ", stringify!(iseq_compile_data))
4402 );
4403 assert_eq!(
4404 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).err_info as *const _ as usize },
4405 0usize,
4406 concat!(
4407 "Offset of field: ",
4408 stringify!(iseq_compile_data),
4409 "::",
4410 stringify!(err_info)
4411 )
4412 );
4413 assert_eq!(
4414 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).mark_ary as *const _ as usize },
4415 8usize,
4416 concat!(
4417 "Offset of field: ",
4418 stringify!(iseq_compile_data),
4419 "::",
4420 stringify!(mark_ary)
4421 )
4422 );
4423 assert_eq!(
4424 unsafe {
4425 &(*(::std::ptr::null::<iseq_compile_data>())).catch_table_ary as *const _ as usize
4426 },
4427 16usize,
4428 concat!(
4429 "Offset of field: ",
4430 stringify!(iseq_compile_data),
4431 "::",
4432 stringify!(catch_table_ary)
4433 )
4434 );
4435 assert_eq!(
4436 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).start_label as *const _ as usize },
4437 24usize,
4438 concat!(
4439 "Offset of field: ",
4440 stringify!(iseq_compile_data),
4441 "::",
4442 stringify!(start_label)
4443 )
4444 );
4445 assert_eq!(
4446 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).end_label as *const _ as usize },
4447 32usize,
4448 concat!(
4449 "Offset of field: ",
4450 stringify!(iseq_compile_data),
4451 "::",
4452 stringify!(end_label)
4453 )
4454 );
4455 assert_eq!(
4456 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).redo_label as *const _ as usize },
4457 40usize,
4458 concat!(
4459 "Offset of field: ",
4460 stringify!(iseq_compile_data),
4461 "::",
4462 stringify!(redo_label)
4463 )
4464 );
4465 assert_eq!(
4466 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).current_block as *const _ as usize },
4467 48usize,
4468 concat!(
4469 "Offset of field: ",
4470 stringify!(iseq_compile_data),
4471 "::",
4472 stringify!(current_block)
4473 )
4474 );
4475 assert_eq!(
4476 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).ensure_node as *const _ as usize },
4477 56usize,
4478 concat!(
4479 "Offset of field: ",
4480 stringify!(iseq_compile_data),
4481 "::",
4482 stringify!(ensure_node)
4483 )
4484 );
4485 assert_eq!(
4486 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).for_iseq as *const _ as usize },
4487 64usize,
4488 concat!(
4489 "Offset of field: ",
4490 stringify!(iseq_compile_data),
4491 "::",
4492 stringify!(for_iseq)
4493 )
4494 );
4495 assert_eq!(
4496 unsafe {
4497 &(*(::std::ptr::null::<iseq_compile_data>())).ensure_node_stack as *const _ as usize
4498 },
4499 72usize,
4500 concat!(
4501 "Offset of field: ",
4502 stringify!(iseq_compile_data),
4503 "::",
4504 stringify!(ensure_node_stack)
4505 )
4506 );
4507 assert_eq!(
4508 unsafe {
4509 &(*(::std::ptr::null::<iseq_compile_data>())).loopval_popped as *const _ as usize
4510 },
4511 80usize,
4512 concat!(
4513 "Offset of field: ",
4514 stringify!(iseq_compile_data),
4515 "::",
4516 stringify!(loopval_popped)
4517 )
4518 );
4519 assert_eq!(
4520 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).cached_const as *const _ as usize },
4521 84usize,
4522 concat!(
4523 "Offset of field: ",
4524 stringify!(iseq_compile_data),
4525 "::",
4526 stringify!(cached_const)
4527 )
4528 );
4529 assert_eq!(
4530 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).storage_head as *const _ as usize },
4531 88usize,
4532 concat!(
4533 "Offset of field: ",
4534 stringify!(iseq_compile_data),
4535 "::",
4536 stringify!(storage_head)
4537 )
4538 );
4539 assert_eq!(
4540 unsafe {
4541 &(*(::std::ptr::null::<iseq_compile_data>())).storage_current as *const _ as usize
4542 },
4543 96usize,
4544 concat!(
4545 "Offset of field: ",
4546 stringify!(iseq_compile_data),
4547 "::",
4548 stringify!(storage_current)
4549 )
4550 );
4551 assert_eq!(
4552 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).last_line as *const _ as usize },
4553 104usize,
4554 concat!(
4555 "Offset of field: ",
4556 stringify!(iseq_compile_data),
4557 "::",
4558 stringify!(last_line)
4559 )
4560 );
4561 assert_eq!(
4562 unsafe {
4563 &(*(::std::ptr::null::<iseq_compile_data>())).last_coverable_line as *const _ as usize
4564 },
4565 108usize,
4566 concat!(
4567 "Offset of field: ",
4568 stringify!(iseq_compile_data),
4569 "::",
4570 stringify!(last_coverable_line)
4571 )
4572 );
4573 assert_eq!(
4574 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).flip_cnt as *const _ as usize },
4575 112usize,
4576 concat!(
4577 "Offset of field: ",
4578 stringify!(iseq_compile_data),
4579 "::",
4580 stringify!(flip_cnt)
4581 )
4582 );
4583 assert_eq!(
4584 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).label_no as *const _ as usize },
4585 116usize,
4586 concat!(
4587 "Offset of field: ",
4588 stringify!(iseq_compile_data),
4589 "::",
4590 stringify!(label_no)
4591 )
4592 );
4593 assert_eq!(
4594 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).node_level as *const _ as usize },
4595 120usize,
4596 concat!(
4597 "Offset of field: ",
4598 stringify!(iseq_compile_data),
4599 "::",
4600 stringify!(node_level)
4601 )
4602 );
4603 assert_eq!(
4604 unsafe { &(*(::std::ptr::null::<iseq_compile_data>())).option as *const _ as usize },
4605 128usize,
4606 concat!(
4607 "Offset of field: ",
4608 stringify!(iseq_compile_data),
4609 "::",
4610 stringify!(option)
4611 )
4612 );
4613}
4614#[repr(C)]
4615#[derive(Debug, Copy, Clone)]
4616pub struct st_table_entry {
4617 pub _address: u8,
4618}
4619#[repr(C)]
4620#[derive(Debug, Copy, Clone)]
4621pub struct iseq_label_data {
4622 pub _address: u8,
4623}