1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
#[repr(C)]
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct __BindgenBitfieldUnit<Storage> {
storage: Storage,
}
impl<Storage> __BindgenBitfieldUnit<Storage> {
#[inline]
pub const fn new(storage: Storage) -> Self {
Self { storage }
}
}
impl<Storage> __BindgenBitfieldUnit<Storage>
where
Storage: AsRef<[u8]> + AsMut<[u8]>,
{
#[inline]
pub fn get_bit(&self, index: usize) -> bool {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = self.storage.as_ref()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
byte & mask == mask
}
#[inline]
pub fn set_bit(&mut self, index: usize, val: bool) {
debug_assert!(index / 8 < self.storage.as_ref().len());
let byte_index = index / 8;
let byte = &mut self.storage.as_mut()[byte_index];
let bit_index = if cfg!(target_endian = "big") {
7 - (index % 8)
} else {
index % 8
};
let mask = 1 << bit_index;
if val {
*byte |= mask;
} else {
*byte &= !mask;
}
}
#[inline]
pub fn get(&self, bit_offset: usize, bit_width: u8) -> u64 {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
let mut val = 0;
for i in 0..(bit_width as usize) {
if self.get_bit(i + bit_offset) {
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
val |= 1 << index;
}
}
val
}
#[inline]
pub fn set(&mut self, bit_offset: usize, bit_width: u8, val: u64) {
debug_assert!(bit_width <= 64);
debug_assert!(bit_offset / 8 < self.storage.as_ref().len());
debug_assert!((bit_offset + (bit_width as usize)) / 8 <= self.storage.as_ref().len());
for i in 0..(bit_width as usize) {
let mask = 1 << i;
let val_bit_is_set = val & mask == mask;
let index = if cfg!(target_endian = "big") {
bit_width as usize - 1 - i
} else {
i
};
self.set_bit(index + bit_offset, val_bit_is_set);
}
}
}
pub type __clockid_t = ::std::os::raw::c_int;
pub type clockid_t = __clockid_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __sigset_t {
pub __val: [usize; 16usize],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_internal_list {
pub __prev: *mut __pthread_internal_list,
pub __next: *mut __pthread_internal_list,
}
pub type __pthread_list_t = __pthread_internal_list;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_mutex_s {
pub __lock: ::std::os::raw::c_int,
pub __count: ::std::os::raw::c_uint,
pub __owner: ::std::os::raw::c_int,
pub __nusers: ::std::os::raw::c_uint,
pub __kind: ::std::os::raw::c_int,
pub __spins: ::std::os::raw::c_short,
pub __elision: ::std::os::raw::c_short,
pub __list: __pthread_list_t,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct __pthread_cond_s {
pub __bindgen_anon_1: __pthread_cond_s__bindgen_ty_1,
pub __bindgen_anon_2: __pthread_cond_s__bindgen_ty_2,
pub __g_refs: [::std::os::raw::c_uint; 2usize],
pub __g_size: [::std::os::raw::c_uint; 2usize],
pub __g1_orig_size: ::std::os::raw::c_uint,
pub __wrefs: ::std::os::raw::c_uint,
pub __g_signals: [::std::os::raw::c_uint; 2usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_1 {
pub __wseq: ::std::os::raw::c_ulonglong,
pub __wseq32: __pthread_cond_s__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_1__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
impl ::std::fmt::Debug for __pthread_cond_s__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "__pthread_cond_s__bindgen_ty_1 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union __pthread_cond_s__bindgen_ty_2 {
pub __g1_start: ::std::os::raw::c_ulonglong,
pub __g1_start32: __pthread_cond_s__bindgen_ty_2__bindgen_ty_1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __pthread_cond_s__bindgen_ty_2__bindgen_ty_1 {
pub __low: ::std::os::raw::c_uint,
pub __high: ::std::os::raw::c_uint,
}
impl ::std::fmt::Debug for __pthread_cond_s__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "__pthread_cond_s__bindgen_ty_2 {{ union }}")
}
}
impl ::std::fmt::Debug for __pthread_cond_s {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "__pthread_cond_s {{ __bindgen_anon_1: {:?}, __bindgen_anon_2: {:?}, __g_refs: {:?}, __g_size: {:?}, __g1_orig_size: {:?}, __wrefs: {:?}, __g_signals: {:?} }}" , self . __bindgen_anon_1 , self . __bindgen_anon_2 , self . __g_refs , self . __g_size , self . __g1_orig_size , self . __wrefs , self . __g_signals)
}
}
pub type pthread_t = usize;
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_mutex_t {
pub __data: __pthread_mutex_s,
pub __size: [::std::os::raw::c_char; 40usize],
pub __align: ::std::os::raw::c_long,
}
impl ::std::fmt::Debug for pthread_mutex_t {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "pthread_mutex_t {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union pthread_cond_t {
pub __data: __pthread_cond_s,
pub __size: [::std::os::raw::c_char; 48usize],
pub __align: ::std::os::raw::c_longlong,
}
impl ::std::fmt::Debug for pthread_cond_t {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "pthread_cond_t {{ union }}")
}
}
pub type VALUE = usize;
pub type ID = usize;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct RBasic {
pub flags: VALUE,
pub klass: VALUE,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RString {
pub basic: RBasic,
pub as_: RString__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RString__bindgen_ty_1 {
pub heap: RString__bindgen_ty_1__bindgen_ty_1,
pub ary: [::std::os::raw::c_char; 24usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RString__bindgen_ty_1__bindgen_ty_1 {
pub len: ::std::os::raw::c_long,
pub ptr: *mut ::std::os::raw::c_char,
pub aux: RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub capa: ::std::os::raw::c_long,
pub shared: VALUE,
}
impl ::std::fmt::Debug for RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RString__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {{ union }}"
)
}
}
impl ::std::fmt::Debug for RString__bindgen_ty_1__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RString__bindgen_ty_1__bindgen_ty_1 {{ len: {:?}, ptr: {:?}, aux: {:?} }}",
self.len, self.ptr, self.aux
)
}
}
impl ::std::fmt::Debug for RString__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "RString__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for RString {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RString {{ basic: {:?}, as: {:?} }}",
self.basic, self.as_
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RArray {
pub basic: RBasic,
pub as_: RArray__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RArray__bindgen_ty_1 {
pub heap: RArray__bindgen_ty_1__bindgen_ty_1,
pub ary: [VALUE; 3usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RArray__bindgen_ty_1__bindgen_ty_1 {
pub len: ::std::os::raw::c_long,
pub aux: RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1,
pub ptr: *const VALUE,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
pub capa: ::std::os::raw::c_long,
pub shared: VALUE,
}
impl ::std::fmt::Debug for RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RArray__bindgen_ty_1__bindgen_ty_1__bindgen_ty_1 {{ union }}"
)
}
}
impl ::std::fmt::Debug for RArray__bindgen_ty_1__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RArray__bindgen_ty_1__bindgen_ty_1 {{ len: {:?}, aux: {:?}, ptr: {:?} }}",
self.len, self.aux, self.ptr
)
}
}
impl ::std::fmt::Debug for RArray__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "RArray__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for RArray {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RArray {{ basic: {:?}, as: {:?} }}",
self.basic, self.as_
)
}
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_global_variable {
_unused: [u8; 0],
}
pub type st_data_t = usize;
pub type st_index_t = st_data_t;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_hash_type {
pub compare: ::std::option::Option<unsafe extern "C" fn() -> ::std::os::raw::c_int>,
pub hash: ::std::option::Option<unsafe extern "C" fn() -> st_index_t>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct st_table {
pub type_: *const st_hash_type,
pub num_bins: st_index_t,
pub _bitfield_align_1: [u64; 0],
pub _bitfield_1: __BindgenBitfieldUnit<[u8; 8usize]>,
pub as_: st_table__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union st_table__bindgen_ty_1 {
pub big: st_table__bindgen_ty_1__bindgen_ty_1,
pub packed: st_table__bindgen_ty_1__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_table__bindgen_ty_1__bindgen_ty_1 {
pub bins: *mut *mut st_table_entry,
pub head: *mut st_table_entry,
pub tail: *mut st_table_entry,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_table__bindgen_ty_1__bindgen_ty_2 {
pub entries: *mut st_packed_entry,
pub real_entries: st_index_t,
}
impl ::std::fmt::Debug for st_table__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "st_table__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for st_table {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "st_table {{ type: {:?}, num_bins: {:?}, entries_packed : {:?}, num_entries : {:?}, as: {:?} }}" , self . type_ , self . num_bins , self . entries_packed () , self . num_entries () , self . as_)
}
}
impl st_table {
#[inline]
pub fn entries_packed(&self) -> ::std::os::raw::c_uint {
unsafe { ::std::mem::transmute(self._bitfield_1.get(0usize, 1u8) as u32) }
}
#[inline]
pub fn set_entries_packed(&mut self, val: ::std::os::raw::c_uint) {
unsafe {
let val: u32 = ::std::mem::transmute(val);
self._bitfield_1.set(0usize, 1u8, val as u64)
}
}
#[inline]
pub fn num_entries(&self) -> st_index_t {
unsafe { ::std::mem::transmute(self._bitfield_1.get(1usize, 63u8) as usize) }
}
#[inline]
pub fn set_num_entries(&mut self, val: st_index_t) {
unsafe {
let val: usize = ::std::mem::transmute(val);
self._bitfield_1.set(1usize, 63u8, val as u64)
}
}
#[inline]
pub fn new_bitfield_1(
entries_packed: ::std::os::raw::c_uint,
num_entries: st_index_t,
) -> __BindgenBitfieldUnit<[u8; 8usize]> {
let mut __bindgen_bitfield_unit: __BindgenBitfieldUnit<[u8; 8usize]> = Default::default();
__bindgen_bitfield_unit.set(0usize, 1u8, {
let entries_packed: u32 = unsafe { ::std::mem::transmute(entries_packed) };
entries_packed as u64
});
__bindgen_bitfield_unit.set(1usize, 63u8, {
let num_entries: usize = unsafe { ::std::mem::transmute(num_entries) };
num_entries as u64
});
__bindgen_bitfield_unit
}
}
pub type rb_unblock_function_t =
::std::option::Option<unsafe extern "C" fn(arg1: *mut ::std::os::raw::c_void)>;
pub type rb_event_flag_t = usize;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct RNode {
pub flags: VALUE,
pub nd_reserved: VALUE,
pub u1: RNode__bindgen_ty_1,
pub u2: RNode__bindgen_ty_2,
pub u3: RNode__bindgen_ty_3,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RNode__bindgen_ty_1 {
pub node: *mut RNode,
pub id: ID,
pub value: VALUE,
pub cfunc: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
pub tbl: *mut ID,
}
impl ::std::fmt::Debug for RNode__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "RNode__bindgen_ty_1 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RNode__bindgen_ty_2 {
pub node: *mut RNode,
pub id: ID,
pub argc: ::std::os::raw::c_long,
pub value: VALUE,
}
impl ::std::fmt::Debug for RNode__bindgen_ty_2 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "RNode__bindgen_ty_2 {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union RNode__bindgen_ty_3 {
pub node: *mut RNode,
pub id: ID,
pub state: ::std::os::raw::c_long,
pub entry: *mut rb_global_entry,
pub args: *mut rb_args_info,
pub cnt: ::std::os::raw::c_long,
pub value: VALUE,
}
impl ::std::fmt::Debug for RNode__bindgen_ty_3 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "RNode__bindgen_ty_3 {{ union }}")
}
}
impl ::std::fmt::Debug for RNode {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"RNode {{ flags: {:?}, nd_reserved: {:?}, u1: {:?}, u2: {:?}, u3: {:?} }}",
self.flags, self.nd_reserved, self.u1, self.u2, self.u3
)
}
}
pub type NODE = RNode;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_global_entry {
pub var: *mut rb_global_variable,
pub id: ID,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_args_info {
pub pre_init: *mut NODE,
pub post_init: *mut NODE,
pub pre_args_num: ::std::os::raw::c_int,
pub post_args_num: ::std::os::raw::c_int,
pub first_post_arg: ID,
pub rest_arg: ID,
pub block_arg: ID,
pub kw_args: *mut NODE,
pub kw_rest_arg: *mut NODE,
pub opt_args: *mut NODE,
}
pub const ruby_id_types_RUBY_ID_LOCAL: ruby_id_types = 0;
pub const ruby_id_types_RUBY_ID_INSTANCE: ruby_id_types = 1;
pub const ruby_id_types_RUBY_ID_GLOBAL: ruby_id_types = 3;
pub const ruby_id_types_RUBY_ID_ATTRSET: ruby_id_types = 4;
pub const ruby_id_types_RUBY_ID_CONST: ruby_id_types = 5;
pub const ruby_id_types_RUBY_ID_CLASS: ruby_id_types = 6;
pub const ruby_id_types_RUBY_ID_JUNK: ruby_id_types = 7;
pub const ruby_id_types_RUBY_ID_INTERNAL: ruby_id_types = 7;
pub const ruby_id_types_RUBY_ID_SCOPE_SHIFT: ruby_id_types = 3;
pub const ruby_id_types_RUBY_ID_SCOPE_MASK: ruby_id_types = 7;
pub type ruby_id_types = ::std::os::raw::c_uint;
pub const ruby_method_ids_idDot2: ruby_method_ids = 128;
pub const ruby_method_ids_idDot3: ruby_method_ids = 129;
pub const ruby_method_ids_idUPlus: ruby_method_ids = 130;
pub const ruby_method_ids_idUMinus: ruby_method_ids = 131;
pub const ruby_method_ids_idPow: ruby_method_ids = 132;
pub const ruby_method_ids_idCmp: ruby_method_ids = 134;
pub const ruby_method_ids_idPLUS: ruby_method_ids = 43;
pub const ruby_method_ids_idMINUS: ruby_method_ids = 45;
pub const ruby_method_ids_idMULT: ruby_method_ids = 42;
pub const ruby_method_ids_idDIV: ruby_method_ids = 47;
pub const ruby_method_ids_idMOD: ruby_method_ids = 37;
pub const ruby_method_ids_idLT: ruby_method_ids = 60;
pub const ruby_method_ids_idLTLT: ruby_method_ids = 135;
pub const ruby_method_ids_idLE: ruby_method_ids = 137;
pub const ruby_method_ids_idGT: ruby_method_ids = 62;
pub const ruby_method_ids_idGE: ruby_method_ids = 138;
pub const ruby_method_ids_idEq: ruby_method_ids = 139;
pub const ruby_method_ids_idEqq: ruby_method_ids = 140;
pub const ruby_method_ids_idNeq: ruby_method_ids = 141;
pub const ruby_method_ids_idNot: ruby_method_ids = 33;
pub const ruby_method_ids_idBackquote: ruby_method_ids = 96;
pub const ruby_method_ids_idEqTilde: ruby_method_ids = 142;
pub const ruby_method_ids_idNeqTilde: ruby_method_ids = 143;
pub const ruby_method_ids_idAREF: ruby_method_ids = 144;
pub const ruby_method_ids_idASET: ruby_method_ids = 145;
pub const ruby_method_ids_tPRESERVED_ID_BEGIN: ruby_method_ids = 147;
pub const ruby_method_ids_idNULL: ruby_method_ids = 148;
pub const ruby_method_ids_idEmptyP: ruby_method_ids = 149;
pub const ruby_method_ids_idEqlP: ruby_method_ids = 150;
pub const ruby_method_ids_idRespond_to: ruby_method_ids = 151;
pub const ruby_method_ids_idRespond_to_missing: ruby_method_ids = 152;
pub const ruby_method_ids_idIFUNC: ruby_method_ids = 153;
pub const ruby_method_ids_idCFUNC: ruby_method_ids = 154;
pub const ruby_method_ids_id_core_set_method_alias: ruby_method_ids = 155;
pub const ruby_method_ids_id_core_set_variable_alias: ruby_method_ids = 156;
pub const ruby_method_ids_id_core_undef_method: ruby_method_ids = 157;
pub const ruby_method_ids_id_core_define_method: ruby_method_ids = 158;
pub const ruby_method_ids_id_core_define_singleton_method: ruby_method_ids = 159;
pub const ruby_method_ids_id_core_set_postexe: ruby_method_ids = 160;
pub const ruby_method_ids_id_core_hash_from_ary: ruby_method_ids = 161;
pub const ruby_method_ids_id_core_hash_merge_ary: ruby_method_ids = 162;
pub const ruby_method_ids_id_core_hash_merge_ptr: ruby_method_ids = 163;
pub const ruby_method_ids_id_core_hash_merge_kwd: ruby_method_ids = 164;
pub const ruby_method_ids_tPRESERVED_ID_END: ruby_method_ids = 165;
pub const ruby_method_ids_tFreeze: ruby_method_ids = 166;
pub const ruby_method_ids_tInspect: ruby_method_ids = 167;
pub const ruby_method_ids_tIntern: ruby_method_ids = 168;
pub const ruby_method_ids_tObject_id: ruby_method_ids = 169;
pub const ruby_method_ids_tConst_missing: ruby_method_ids = 170;
pub const ruby_method_ids_tMethodMissing: ruby_method_ids = 171;
pub const ruby_method_ids_tMethod_added: ruby_method_ids = 172;
pub const ruby_method_ids_tSingleton_method_added: ruby_method_ids = 173;
pub const ruby_method_ids_tMethod_removed: ruby_method_ids = 174;
pub const ruby_method_ids_tSingleton_method_removed: ruby_method_ids = 175;
pub const ruby_method_ids_tMethod_undefined: ruby_method_ids = 176;
pub const ruby_method_ids_tSingleton_method_undefined: ruby_method_ids = 177;
pub const ruby_method_ids_tLength: ruby_method_ids = 178;
pub const ruby_method_ids_tSize: ruby_method_ids = 179;
pub const ruby_method_ids_tGets: ruby_method_ids = 180;
pub const ruby_method_ids_tSucc: ruby_method_ids = 181;
pub const ruby_method_ids_tEach: ruby_method_ids = 182;
pub const ruby_method_ids_tProc: ruby_method_ids = 183;
pub const ruby_method_ids_tLambda: ruby_method_ids = 184;
pub const ruby_method_ids_tSend: ruby_method_ids = 185;
pub const ruby_method_ids_t__send__: ruby_method_ids = 186;
pub const ruby_method_ids_t__attached__: ruby_method_ids = 187;
pub const ruby_method_ids_tInitialize: ruby_method_ids = 188;
pub const ruby_method_ids_tInitialize_copy: ruby_method_ids = 189;
pub const ruby_method_ids_tInitialize_clone: ruby_method_ids = 190;
pub const ruby_method_ids_tInitialize_dup: ruby_method_ids = 191;
pub const ruby_method_ids_tUScore: ruby_method_ids = 192;
pub const ruby_method_ids_idFreeze: ruby_method_ids = 1328;
pub const ruby_method_ids_idInspect: ruby_method_ids = 1336;
pub const ruby_method_ids_idIntern: ruby_method_ids = 1344;
pub const ruby_method_ids_idObject_id: ruby_method_ids = 1352;
pub const ruby_method_ids_idConst_missing: ruby_method_ids = 1360;
pub const ruby_method_ids_idMethodMissing: ruby_method_ids = 1368;
pub const ruby_method_ids_idMethod_added: ruby_method_ids = 1376;
pub const ruby_method_ids_idSingleton_method_added: ruby_method_ids = 1384;
pub const ruby_method_ids_idMethod_removed: ruby_method_ids = 1392;
pub const ruby_method_ids_idSingleton_method_removed: ruby_method_ids = 1400;
pub const ruby_method_ids_idMethod_undefined: ruby_method_ids = 1408;
pub const ruby_method_ids_idSingleton_method_undefined: ruby_method_ids = 1416;
pub const ruby_method_ids_idLength: ruby_method_ids = 1424;
pub const ruby_method_ids_idSize: ruby_method_ids = 1432;
pub const ruby_method_ids_idGets: ruby_method_ids = 1440;
pub const ruby_method_ids_idSucc: ruby_method_ids = 1448;
pub const ruby_method_ids_idEach: ruby_method_ids = 1456;
pub const ruby_method_ids_idProc: ruby_method_ids = 1464;
pub const ruby_method_ids_idLambda: ruby_method_ids = 1472;
pub const ruby_method_ids_idSend: ruby_method_ids = 1480;
pub const ruby_method_ids_id__send__: ruby_method_ids = 1488;
pub const ruby_method_ids_id__attached__: ruby_method_ids = 1496;
pub const ruby_method_ids_idInitialize: ruby_method_ids = 1504;
pub const ruby_method_ids_idInitialize_copy: ruby_method_ids = 1512;
pub const ruby_method_ids_idInitialize_clone: ruby_method_ids = 1520;
pub const ruby_method_ids_idInitialize_dup: ruby_method_ids = 1528;
pub const ruby_method_ids_idUScore: ruby_method_ids = 1536;
pub const ruby_method_ids_tLAST_OP_ID: ruby_method_ids = 164;
pub const ruby_method_ids_idLAST_OP_ID: ruby_method_ids = 20;
pub type ruby_method_ids = ::std::os::raw::c_uint;
pub type rb_serial_t = ::std::os::raw::c_ulonglong;
pub const rb_method_flag_t_NOEX_PUBLIC: rb_method_flag_t = 0;
pub const rb_method_flag_t_NOEX_NOSUPER: rb_method_flag_t = 1;
pub const rb_method_flag_t_NOEX_PRIVATE: rb_method_flag_t = 2;
pub const rb_method_flag_t_NOEX_PROTECTED: rb_method_flag_t = 4;
pub const rb_method_flag_t_NOEX_MASK: rb_method_flag_t = 6;
pub const rb_method_flag_t_NOEX_BASIC: rb_method_flag_t = 8;
pub const rb_method_flag_t_NOEX_UNDEF: rb_method_flag_t = 1;
pub const rb_method_flag_t_NOEX_MODFUNC: rb_method_flag_t = 18;
pub const rb_method_flag_t_NOEX_SUPER: rb_method_flag_t = 32;
pub const rb_method_flag_t_NOEX_VCALL: rb_method_flag_t = 64;
pub const rb_method_flag_t_NOEX_RESPONDS: rb_method_flag_t = 128;
pub const rb_method_flag_t_NOEX_BIT_WIDTH: rb_method_flag_t = 8;
pub const rb_method_flag_t_NOEX_SAFE_SHIFT_OFFSET: rb_method_flag_t = 8;
pub type rb_method_flag_t = ::std::os::raw::c_uint;
pub const rb_method_type_t_VM_METHOD_TYPE_ISEQ: rb_method_type_t = 0;
pub const rb_method_type_t_VM_METHOD_TYPE_CFUNC: rb_method_type_t = 1;
pub const rb_method_type_t_VM_METHOD_TYPE_ATTRSET: rb_method_type_t = 2;
pub const rb_method_type_t_VM_METHOD_TYPE_IVAR: rb_method_type_t = 3;
pub const rb_method_type_t_VM_METHOD_TYPE_BMETHOD: rb_method_type_t = 4;
pub const rb_method_type_t_VM_METHOD_TYPE_ZSUPER: rb_method_type_t = 5;
pub const rb_method_type_t_VM_METHOD_TYPE_UNDEF: rb_method_type_t = 6;
pub const rb_method_type_t_VM_METHOD_TYPE_NOTIMPLEMENTED: rb_method_type_t = 7;
pub const rb_method_type_t_VM_METHOD_TYPE_OPTIMIZED: rb_method_type_t = 8;
pub const rb_method_type_t_VM_METHOD_TYPE_MISSING: rb_method_type_t = 9;
pub const rb_method_type_t_VM_METHOD_TYPE_REFINED: rb_method_type_t = 10;
pub type rb_method_type_t = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_method_cfunc_struct {
pub func: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
pub invoker: ::std::option::Option<
unsafe extern "C" fn(
func: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
recv: VALUE,
argc: ::std::os::raw::c_int,
argv: *const VALUE,
) -> VALUE,
>,
pub argc: ::std::os::raw::c_int,
}
pub type rb_method_cfunc_t = rb_method_cfunc_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_method_attr_struct {
pub id: ID,
pub location: VALUE,
}
pub type rb_method_attr_t = rb_method_attr_struct;
pub type rb_iseq_t = rb_iseq_struct;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_method_definition_struct {
pub type_: rb_method_type_t,
pub original_id: ID,
pub body: rb_method_definition_struct__bindgen_ty_1,
pub alias_count: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rb_method_definition_struct__bindgen_ty_1 {
pub iseq: *mut rb_iseq_t,
pub cfunc: rb_method_cfunc_t,
pub attr: rb_method_attr_t,
pub proc_: VALUE,
pub optimize_type: rb_method_definition_struct__bindgen_ty_1_method_optimized_type,
pub orig_me: *mut rb_method_entry_struct,
}
pub 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 ;
pub 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 ;
pub const rb_method_definition_struct__bindgen_ty_1_method_optimized_type_OPTIMIZED_METHOD_TYPE__MAX : rb_method_definition_struct__bindgen_ty_1_method_optimized_type = 2 ;
pub type rb_method_definition_struct__bindgen_ty_1_method_optimized_type = ::std::os::raw::c_uint;
impl ::std::fmt::Debug for rb_method_definition_struct__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "rb_method_definition_struct__bindgen_ty_1 {{ union }}")
}
}
pub type rb_method_definition_t = rb_method_definition_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_method_entry_struct {
pub flag: rb_method_flag_t,
pub mark: ::std::os::raw::c_char,
pub def: *mut rb_method_definition_t,
pub called_id: ID,
pub klass: VALUE,
}
pub type rb_method_entry_t = rb_method_entry_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct unlinked_method_entry_list_entry {
pub next: *mut unlinked_method_entry_list_entry,
pub me: *mut rb_method_entry_t,
}
pub type rb_atomic_t = ::std::os::raw::c_uint;
pub type __jmp_buf = [::std::os::raw::c_long; 8usize];
pub type rb_nativethread_id_t = pthread_t;
pub type rb_nativethread_lock_t = pthread_mutex_t;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_thread_cond_struct {
pub cond: pthread_cond_t,
pub clockid: clockid_t,
}
impl ::std::fmt::Debug for rb_thread_cond_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"rb_thread_cond_struct {{ cond: {:?}, clockid: {:?} }}",
self.cond, self.clockid
)
}
}
pub type rb_nativethread_cond_t = rb_thread_cond_struct;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct native_thread_data_struct {
pub signal_thread_list: *mut ::std::os::raw::c_void,
pub sleep_cond: rb_nativethread_cond_t,
}
impl ::std::fmt::Debug for native_thread_data_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"native_thread_data_struct {{ signal_thread_list: {:?}, sleep_cond: {:?} }}",
self.signal_thread_list, self.sleep_cond
)
}
}
pub type native_thread_data_t = native_thread_data_struct;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_global_vm_lock_struct {
pub acquired: ::std::os::raw::c_ulong,
pub lock: pthread_mutex_t,
pub waiting: ::std::os::raw::c_ulong,
pub cond: rb_nativethread_cond_t,
pub switch_cond: rb_nativethread_cond_t,
pub switch_wait_cond: rb_nativethread_cond_t,
pub need_yield: ::std::os::raw::c_int,
pub wait_yield: ::std::os::raw::c_int,
}
impl ::std::fmt::Debug for rb_global_vm_lock_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "rb_global_vm_lock_struct {{ acquired: {:?}, lock: {:?}, waiting: {:?}, cond: {:?}, switch_cond: {:?}, switch_wait_cond: {:?}, need_yield: {:?}, wait_yield: {:?} }}" , self . acquired , self . lock , self . waiting , self . cond , self . switch_cond , self . switch_wait_cond , self . need_yield , self . wait_yield)
}
}
pub type rb_global_vm_lock_t = rb_global_vm_lock_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct __jmp_buf_tag {
pub __jmpbuf: __jmp_buf,
pub __mask_was_saved: ::std::os::raw::c_int,
pub __saved_mask: __sigset_t,
}
pub type jmp_buf = [__jmp_buf_tag; 1usize];
pub type rb_num_t = usize;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_compile_data_ensure_node_stack {
_unused: [u8; 0],
}
pub type rb_compile_option_t = rb_compile_option_struct;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct iseq_inline_cache_entry {
pub ic_serial: rb_serial_t,
pub ic_value: iseq_inline_cache_entry__bindgen_ty_1,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union iseq_inline_cache_entry__bindgen_ty_1 {
pub index: usize,
pub value: VALUE,
}
impl ::std::fmt::Debug for iseq_inline_cache_entry__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "iseq_inline_cache_entry__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for iseq_inline_cache_entry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(
f,
"iseq_inline_cache_entry {{ ic_serial: {:?}, ic_value: {:?} }}",
self.ic_serial, self.ic_value
)
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union iseq_inline_storage_entry {
pub once: iseq_inline_storage_entry__bindgen_ty_1,
pub cache: iseq_inline_cache_entry,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_inline_storage_entry__bindgen_ty_1 {
pub running_thread: *mut rb_thread_struct,
pub value: VALUE,
pub done: VALUE,
}
impl ::std::fmt::Debug for iseq_inline_storage_entry {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "iseq_inline_storage_entry {{ union }}")
}
}
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_call_info_struct {
pub mid: ID,
pub flag: VALUE,
pub orig_argc: ::std::os::raw::c_int,
pub blockiseq: *mut rb_iseq_t,
pub method_state: rb_serial_t,
pub class_serial: rb_serial_t,
pub klass: VALUE,
pub me: *const rb_method_entry_t,
pub defined_class: VALUE,
pub argc: ::std::os::raw::c_int,
pub blockptr: *mut rb_block_struct,
pub recv: VALUE,
pub aux: rb_call_info_struct__bindgen_ty_1,
pub call: ::std::option::Option<
unsafe extern "C" fn(
th: *mut rb_thread_struct,
cfp: *mut rb_control_frame_struct,
ci: *mut rb_call_info_struct,
) -> VALUE,
>,
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union rb_call_info_struct__bindgen_ty_1 {
pub opt_pc: ::std::os::raw::c_int,
pub index: ::std::os::raw::c_long,
pub missing_reason: ::std::os::raw::c_int,
pub inc_sp: ::std::os::raw::c_int,
}
impl ::std::fmt::Debug for rb_call_info_struct__bindgen_ty_1 {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write!(f, "rb_call_info_struct__bindgen_ty_1 {{ union }}")
}
}
impl ::std::fmt::Debug for rb_call_info_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "rb_call_info_struct {{ mid: {:?}, flag: {:?}, orig_argc: {:?}, blockiseq: {:?}, method_state: {:?}, class_serial: {:?}, klass: {:?}, me: {:?}, defined_class: {:?}, argc: {:?}, blockptr: {:?}, recv: {:?}, aux: {:?}, call: {:?} }}" , self . mid , self . flag , self . orig_argc , self . blockiseq , self . method_state , self . class_serial , self . klass , self . me , self . defined_class , self . argc , self . blockptr , self . recv , self . aux , self . call)
}
}
pub type rb_call_info_t = rb_call_info_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_iseq_location_struct {
pub path: VALUE,
pub absolute_path: VALUE,
pub base_label: VALUE,
pub label: VALUE,
pub first_lineno: usize,
}
pub type rb_iseq_location_t = rb_iseq_location_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_iseq_struct {
pub type_: rb_iseq_struct_iseq_type,
pub location: rb_iseq_location_t,
pub iseq: *mut VALUE,
pub iseq_encoded: *mut VALUE,
pub iseq_size: ::std::os::raw::c_ulong,
pub mark_ary: VALUE,
pub coverage: VALUE,
pub line_info_table: *mut iseq_line_info_entry,
pub line_info_size: usize,
pub local_table: *mut ID,
pub local_table_size: ::std::os::raw::c_int,
pub local_size: ::std::os::raw::c_int,
pub is_entries: *mut iseq_inline_storage_entry,
pub is_size: ::std::os::raw::c_int,
pub callinfo_entries: *mut rb_call_info_t,
pub callinfo_size: ::std::os::raw::c_int,
pub argc: ::std::os::raw::c_int,
pub arg_simple: ::std::os::raw::c_int,
pub arg_rest: ::std::os::raw::c_int,
pub arg_block: ::std::os::raw::c_int,
pub arg_opts: ::std::os::raw::c_int,
pub arg_post_len: ::std::os::raw::c_int,
pub arg_post_start: ::std::os::raw::c_int,
pub arg_size: ::std::os::raw::c_int,
pub arg_opt_table: *mut VALUE,
pub arg_keyword: ::std::os::raw::c_int,
pub arg_keyword_check: ::std::os::raw::c_int,
pub arg_keywords: ::std::os::raw::c_int,
pub arg_keyword_required: ::std::os::raw::c_int,
pub arg_keyword_table: *mut ID,
pub stack_max: usize,
pub catch_table: *mut iseq_catch_table_entry,
pub catch_table_size: ::std::os::raw::c_int,
pub parent_iseq: *mut rb_iseq_struct,
pub local_iseq: *mut rb_iseq_struct,
pub self_: VALUE,
pub orig: VALUE,
pub cref_stack: *mut NODE,
pub klass: VALUE,
pub defined_method_id: ID,
pub flip_cnt: rb_num_t,
pub compile_data: *mut iseq_compile_data,
}
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_TOP: rb_iseq_struct_iseq_type = 0;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_METHOD: rb_iseq_struct_iseq_type = 1;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_BLOCK: rb_iseq_struct_iseq_type = 2;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_CLASS: rb_iseq_struct_iseq_type = 3;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_RESCUE: rb_iseq_struct_iseq_type = 4;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_ENSURE: rb_iseq_struct_iseq_type = 5;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_EVAL: rb_iseq_struct_iseq_type = 6;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_MAIN: rb_iseq_struct_iseq_type = 7;
pub const rb_iseq_struct_iseq_type_ISEQ_TYPE_DEFINED_GUARD: rb_iseq_struct_iseq_type = 8;
pub type rb_iseq_struct_iseq_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_objspace {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_hook_list_struct {
pub hooks: *mut rb_event_hook_struct,
pub events: rb_event_flag_t,
pub need_clean: ::std::os::raw::c_int,
}
pub type rb_hook_list_t = rb_hook_list_struct;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_vm_struct {
pub self_: VALUE,
pub gvl: rb_global_vm_lock_t,
pub thread_destruct_lock: rb_nativethread_lock_t,
pub main_thread: *mut rb_thread_struct,
pub running_thread: *mut rb_thread_struct,
pub living_threads: *mut st_table,
pub thgroup_default: VALUE,
pub running: ::std::os::raw::c_int,
pub thread_abort_on_exception: ::std::os::raw::c_int,
pub trace_running: ::std::os::raw::c_int,
pub sleeper: ::std::os::raw::c_int,
pub mark_object_ary: VALUE,
pub special_exceptions: [VALUE; 4usize],
pub top_self: VALUE,
pub load_path: VALUE,
pub load_path_snapshot: VALUE,
pub load_path_check_cache: VALUE,
pub expanded_load_path: VALUE,
pub loaded_features: VALUE,
pub loaded_features_snapshot: VALUE,
pub loaded_features_index: *mut st_table,
pub loading_table: *mut st_table,
pub trap_list: [rb_vm_struct__bindgen_ty_1; 65usize],
pub event_hooks: rb_hook_list_t,
pub ensure_rollback_table: *mut st_table,
pub postponed_job_buffer: *mut rb_postponed_job_struct,
pub postponed_job_index: ::std::os::raw::c_int,
pub src_encoding_index: ::std::os::raw::c_int,
pub verbose: VALUE,
pub debug: VALUE,
pub orig_progname: VALUE,
pub progname: VALUE,
pub coverages: VALUE,
pub unlinked_method_entry_list: *mut unlinked_method_entry_list_entry,
pub defined_module_hash: VALUE,
pub objspace: *mut rb_objspace,
pub at_exit: RArray,
pub defined_strings: *mut VALUE,
pub default_params: rb_vm_struct__bindgen_ty_2,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_vm_struct__bindgen_ty_1 {
pub cmd: VALUE,
pub safe: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_vm_struct__bindgen_ty_2 {
pub thread_vm_stack_size: usize,
pub thread_machine_stack_size: usize,
pub fiber_vm_stack_size: usize,
pub fiber_machine_stack_size: usize,
}
impl ::std::fmt::Debug for rb_vm_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "rb_vm_struct {{ self: {:?}, gvl: {:?}, thread_destruct_lock: {:?}, main_thread: {:?}, running_thread: {:?}, living_threads: {:?}, thgroup_default: {:?}, running: {:?}, thread_abort_on_exception: {:?}, trace_running: {:?}, sleeper: {:?}, mark_object_ary: {:?}, special_exceptions: {:?}, top_self: {:?}, load_path: {:?}, load_path_snapshot: {:?}, load_path_check_cache: {:?}, expanded_load_path: {:?}, loaded_features: {:?}, loaded_features_snapshot: {:?}, loaded_features_index: {:?}, loading_table: {:?}, trap_list: {:?}, event_hooks: {:?}, ensure_rollback_table: {:?}, postponed_job_buffer: {:?}, postponed_job_index: {:?}, src_encoding_index: {:?}, verbose: {:?}, debug: {:?}, orig_progname: {:?}, progname: {:?}, coverages: {:?}, unlinked_method_entry_list: {:?}, defined_module_hash: {:?}, objspace: {:?}, at_exit: {:?}, defined_strings: {:?}, default_params: {:?} }}" , self . self_ , self . gvl , self . thread_destruct_lock , self . main_thread , self . running_thread , self . living_threads , self . thgroup_default , self . running , self . thread_abort_on_exception , self . trace_running , self . sleeper , self . mark_object_ary , self . special_exceptions , self . top_self , self . load_path , self . load_path_snapshot , self . load_path_check_cache , self . expanded_load_path , self . loaded_features , self . loaded_features_snapshot , self . loaded_features_index , self . loading_table , self . trap_list , self . event_hooks , self . ensure_rollback_table , self . postponed_job_buffer , self . postponed_job_index , self . src_encoding_index , self . verbose , self . debug , self . orig_progname , self . progname , self . coverages , self . unlinked_method_entry_list , self . defined_module_hash , self . objspace , self . at_exit , self . defined_strings , self . default_params)
}
}
pub type rb_vm_t = rb_vm_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_control_frame_struct {
pub pc: *mut VALUE,
pub sp: *mut VALUE,
pub iseq: *mut rb_iseq_t,
pub flag: VALUE,
pub self_: VALUE,
pub klass: VALUE,
pub ep: *mut VALUE,
pub block_iseq: *mut rb_iseq_t,
pub proc_: VALUE,
pub me: *const rb_method_entry_t,
}
pub type rb_control_frame_t = rb_control_frame_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_block_struct {
pub self_: VALUE,
pub klass: VALUE,
pub ep: *mut VALUE,
pub iseq: *mut rb_iseq_t,
pub proc_: VALUE,
}
pub type rb_block_t = rb_block_struct;
pub const rb_thread_status_THREAD_RUNNABLE: rb_thread_status = 0;
pub const rb_thread_status_THREAD_STOPPED: rb_thread_status = 1;
pub const rb_thread_status_THREAD_STOPPED_FOREVER: rb_thread_status = 2;
pub const rb_thread_status_THREAD_KILLED: rb_thread_status = 3;
pub type rb_thread_status = ::std::os::raw::c_uint;
pub type rb_jmpbuf_t = jmp_buf;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_vm_tag {
pub tag: VALUE,
pub retval: VALUE,
pub buf: rb_jmpbuf_t,
pub prev: *mut rb_vm_tag,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_vm_protect_tag {
pub prev: *mut rb_vm_protect_tag,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_unblock_callback {
pub func: rb_unblock_function_t,
pub arg: *mut ::std::os::raw::c_void,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_mutex_struct {
_unused: [u8; 0],
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_thread_list_struct {
pub next: *mut rb_thread_list_struct,
pub th: *mut rb_thread_struct,
}
pub type rb_thread_list_t = rb_thread_list_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_ensure_entry {
pub marker: VALUE,
pub e_proc: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
pub data2: VALUE,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_ensure_list {
pub next: *mut rb_ensure_list,
pub entry: rb_ensure_entry,
}
pub type rb_ensure_list_t = rb_ensure_list;
#[repr(C)]
#[derive(Copy, Clone)]
pub struct rb_thread_struct {
pub self_: VALUE,
pub vm: *mut rb_vm_t,
pub stack: *mut VALUE,
pub stack_size: usize,
pub cfp: *mut rb_control_frame_t,
pub safe_level: ::std::os::raw::c_int,
pub raised_flag: ::std::os::raw::c_int,
pub last_status: VALUE,
pub state: ::std::os::raw::c_int,
pub waiting_fd: ::std::os::raw::c_int,
pub passed_block: *const rb_block_t,
pub passed_me: *const rb_method_entry_t,
pub passed_ci: *mut rb_call_info_t,
pub top_self: VALUE,
pub top_wrapper: VALUE,
pub base_block: *mut rb_block_t,
pub root_lep: *mut VALUE,
pub root_svar: VALUE,
pub thread_id: rb_nativethread_id_t,
pub status: rb_thread_status,
pub to_kill: ::std::os::raw::c_int,
pub priority: ::std::os::raw::c_int,
pub native_thread_data: native_thread_data_t,
pub blocking_region_buffer: *mut ::std::os::raw::c_void,
pub thgroup: VALUE,
pub value: VALUE,
pub errinfo: VALUE,
pub pending_interrupt_queue: VALUE,
pub pending_interrupt_queue_checked: ::std::os::raw::c_int,
pub pending_interrupt_mask_stack: VALUE,
pub interrupt_flag: rb_atomic_t,
pub interrupt_mask: ::std::os::raw::c_ulong,
pub interrupt_lock: rb_nativethread_lock_t,
pub interrupt_cond: rb_nativethread_cond_t,
pub unblock: rb_unblock_callback,
pub locking_mutex: VALUE,
pub keeping_mutexes: *mut rb_mutex_struct,
pub tag: *mut rb_vm_tag,
pub protect_tag: *mut rb_vm_protect_tag,
pub parse_in_eval: ::std::os::raw::c_int,
pub mild_compile_error: ::std::os::raw::c_int,
pub local_storage: *mut st_table,
pub join_list: *mut rb_thread_list_t,
pub first_proc: VALUE,
pub first_args: VALUE,
pub first_func: ::std::option::Option<unsafe extern "C" fn() -> VALUE>,
pub machine_stack_start: *mut VALUE,
pub machine_stack_end: *mut VALUE,
pub machine_stack_maxsize: usize,
pub machine_regs: jmp_buf,
pub mark_stack_len: ::std::os::raw::c_int,
pub stat_insn_usage: VALUE,
pub event_hooks: rb_hook_list_t,
pub trace_arg: *mut rb_trace_arg_struct,
pub fiber: VALUE,
pub root_fiber: VALUE,
pub root_jmpbuf: rb_jmpbuf_t,
pub ensure_list: *mut rb_ensure_list_t,
pub method_missing_reason: ::std::os::raw::c_int,
pub abort_on_exception: ::std::os::raw::c_int,
pub altstack: *mut ::std::os::raw::c_void,
pub running_time_us: ::std::os::raw::c_ulong,
}
impl ::std::fmt::Debug for rb_thread_struct {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
write ! (f , "rb_thread_struct {{ self: {:?}, vm: {:?}, stack: {:?}, cfp: {:?}, safe_level: {:?}, raised_flag: {:?}, last_status: {:?}, state: {:?}, waiting_fd: {:?}, passed_block: {:?}, passed_me: {:?}, passed_ci: {:?}, top_self: {:?}, top_wrapper: {:?}, base_block: {:?}, root_lep: {:?}, root_svar: {:?}, thread_id: {:?}, status: {:?}, to_kill: {:?}, priority: {:?}, native_thread_data: {:?}, blocking_region_buffer: {:?}, thgroup: {:?}, value: {:?}, errinfo: {:?}, pending_interrupt_queue: {:?}, pending_interrupt_queue_checked: {:?}, pending_interrupt_mask_stack: {:?}, interrupt_flag: {:?}, interrupt_mask: {:?}, interrupt_lock: {:?}, interrupt_cond: {:?}, unblock: {:?}, locking_mutex: {:?}, keeping_mutexes: {:?}, tag: {:?}, protect_tag: {:?}, parse_in_eval: {:?}, mild_compile_error: {:?}, local_storage: {:?}, join_list: {:?}, first_proc: {:?}, first_args: {:?}, first_func: {:?}, machine_stack_start: {:?}, machine_stack_end: {:?}, machine_regs: {:?}, mark_stack_len: {:?}, stat_insn_usage: {:?}, event_hooks: {:?}, trace_arg: {:?}, fiber: {:?}, root_fiber: {:?}, root_jmpbuf: {:?}, ensure_list: {:?}, method_missing_reason: {:?}, abort_on_exception: {:?}, altstack: {:?}, running_time_us: {:?} }}" , self . self_ , self . vm , self . stack , self . cfp , self . safe_level , self . raised_flag , self . last_status , self . state , self . waiting_fd , self . passed_block , self . passed_me , self . passed_ci , self . top_self , self . top_wrapper , self . base_block , self . root_lep , self . root_svar , self . thread_id , self . status , self . to_kill , self . priority , self . native_thread_data , self . blocking_region_buffer , self . thgroup , self . value , self . errinfo , self . pending_interrupt_queue , self . pending_interrupt_queue_checked , self . pending_interrupt_mask_stack , self . interrupt_flag , self . interrupt_mask , self . interrupt_lock , self . interrupt_cond , self . unblock , self . locking_mutex , self . keeping_mutexes , self . tag , self . protect_tag , self . parse_in_eval , self . mild_compile_error , self . local_storage , self . join_list , self . first_proc , self . first_args , self . first_func , self . machine_stack_start , self . machine_stack_end , self . machine_regs , self . mark_stack_len , self . stat_insn_usage , self . event_hooks , self . trace_arg , self . fiber , self . root_fiber , self . root_jmpbuf , self . ensure_list , self . method_missing_reason , self . abort_on_exception , self . altstack , self . running_time_us)
}
}
pub type rb_thread_t = rb_thread_struct;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_trace_arg_struct {
pub event: rb_event_flag_t,
pub th: *mut rb_thread_t,
pub cfp: *mut rb_control_frame_t,
pub self_: VALUE,
pub id: ID,
pub klass: VALUE,
pub data: VALUE,
pub klass_solved: ::std::os::raw::c_int,
pub lineno: ::std::os::raw::c_int,
pub path: VALUE,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_compile_option_struct {
pub inline_const_cache: ::std::os::raw::c_int,
pub peephole_optimization: ::std::os::raw::c_int,
pub tailcall_optimization: ::std::os::raw::c_int,
pub specialized_instruction: ::std::os::raw::c_int,
pub operands_unification: ::std::os::raw::c_int,
pub instructions_unification: ::std::os::raw::c_int,
pub stack_caching: ::std::os::raw::c_int,
pub trace_instruction: ::std::os::raw::c_int,
pub debug_level: ::std::os::raw::c_int,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_line_info_entry {
pub position: ::std::os::raw::c_uint,
pub line_no: ::std::os::raw::c_uint,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_catch_table_entry {
pub type_: iseq_catch_table_entry_catch_type,
pub iseq: VALUE,
pub start: ::std::os::raw::c_ulong,
pub end: ::std::os::raw::c_ulong,
pub cont: ::std::os::raw::c_ulong,
pub sp: ::std::os::raw::c_ulong,
}
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_RESCUE: iseq_catch_table_entry_catch_type =
3;
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_ENSURE: iseq_catch_table_entry_catch_type =
5;
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_RETRY: iseq_catch_table_entry_catch_type = 7;
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_BREAK: iseq_catch_table_entry_catch_type = 9;
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_REDO: iseq_catch_table_entry_catch_type = 11;
pub const iseq_catch_table_entry_catch_type_CATCH_TYPE_NEXT: iseq_catch_table_entry_catch_type = 13;
pub type iseq_catch_table_entry_catch_type = ::std::os::raw::c_uint;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_compile_data_storage {
pub next: *mut iseq_compile_data_storage,
pub pos: ::std::os::raw::c_ulong,
pub size: ::std::os::raw::c_ulong,
pub buff: *mut ::std::os::raw::c_char,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_compile_data {
pub err_info: VALUE,
pub mark_ary: VALUE,
pub catch_table_ary: VALUE,
pub start_label: *mut iseq_label_data,
pub end_label: *mut iseq_label_data,
pub redo_label: *mut iseq_label_data,
pub current_block: VALUE,
pub ensure_node: VALUE,
pub for_iseq: VALUE,
pub ensure_node_stack: *mut iseq_compile_data_ensure_node_stack,
pub loopval_popped: ::std::os::raw::c_int,
pub cached_const: ::std::os::raw::c_int,
pub storage_head: *mut iseq_compile_data_storage,
pub storage_current: *mut iseq_compile_data_storage,
pub last_line: ::std::os::raw::c_int,
pub last_coverable_line: ::std::os::raw::c_int,
pub label_no: ::std::os::raw::c_int,
pub node_level: ::std::os::raw::c_int,
pub option: *const rb_compile_option_t,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_table_entry {
pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct st_packed_entry {
pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_event_hook_struct {
pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct rb_postponed_job_struct {
pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct iseq_label_data {
pub _address: u8,
}