uclicious-libucl-sys 0.9.2

Low-level FFI bindings to libucl (0.9.x), linked via pkg-config.
Documentation
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
/* automatically generated by rust-bindgen 0.72.1 */

#![allow(non_camel_case_types)]
#![allow(non_upper_case_globals)]
#![allow(non_snake_case)]
#![allow(dead_code)]
#![allow(clippy::all)]
#![allow(rustdoc::all)]

pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __off_t = ::std::os::raw::c_long;
pub type __off64_t = ::std::os::raw::c_long;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_error {
    UCL_EOK = 0,
    UCL_ESYNTAX = 1,
    UCL_EIO = 2,
    UCL_ESTATE = 3,
    UCL_ENESTED = 4,
    UCL_EUNPAIRED = 5,
    UCL_EMACRO = 6,
    UCL_EINTERNAL = 7,
    UCL_ESSL = 8,
    UCL_EMERGE = 9,
}
pub use self::ucl_error as ucl_error_t;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_type {
    UCL_OBJECT = 0,
    UCL_ARRAY = 1,
    UCL_INT = 2,
    UCL_FLOAT = 3,
    UCL_STRING = 4,
    UCL_BOOLEAN = 5,
    UCL_TIME = 6,
    UCL_USERDATA = 7,
    UCL_NULL = 8,
}
pub use self::ucl_type as ucl_type_t;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_emitter {
    UCL_EMIT_JSON = 0,
    UCL_EMIT_JSON_COMPACT = 1,
    UCL_EMIT_CONFIG = 2,
    UCL_EMIT_YAML = 3,
    UCL_EMIT_MSGPACK = 4,
    UCL_EMIT_MAX = 5,
}
pub use self::ucl_emitter as ucl_emitter_t;
impl ucl_parser_flags {
    pub const UCL_PARSER_DEFAULT: ucl_parser_flags = ucl_parser_flags(0);
    pub const UCL_PARSER_KEY_LOWERCASE: ucl_parser_flags = ucl_parser_flags(1);
    pub const UCL_PARSER_ZEROCOPY: ucl_parser_flags = ucl_parser_flags(2);
    pub const UCL_PARSER_NO_TIME: ucl_parser_flags = ucl_parser_flags(4);
    pub const UCL_PARSER_NO_IMPLICIT_ARRAYS: ucl_parser_flags = ucl_parser_flags(8);
    pub const UCL_PARSER_SAVE_COMMENTS: ucl_parser_flags = ucl_parser_flags(16);
    pub const UCL_PARSER_DISABLE_MACRO: ucl_parser_flags = ucl_parser_flags(32);
    pub const UCL_PARSER_NO_FILEVARS: ucl_parser_flags = ucl_parser_flags(64);
}
impl ::std::ops::BitOr<ucl_parser_flags> for ucl_parser_flags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        ucl_parser_flags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for ucl_parser_flags {
    #[inline]
    fn bitor_assign(&mut self, rhs: ucl_parser_flags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<ucl_parser_flags> for ucl_parser_flags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        ucl_parser_flags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for ucl_parser_flags {
    #[inline]
    fn bitand_assign(&mut self, rhs: ucl_parser_flags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ucl_parser_flags(pub ::std::os::raw::c_uint);
pub use self::ucl_parser_flags as ucl_parser_flags_t;
impl ucl_string_flags {
    pub const UCL_STRING_RAW: ucl_string_flags = ucl_string_flags(0);
    pub const UCL_STRING_ESCAPE: ucl_string_flags = ucl_string_flags(1);
    pub const UCL_STRING_TRIM: ucl_string_flags = ucl_string_flags(2);
    pub const UCL_STRING_PARSE_BOOLEAN: ucl_string_flags = ucl_string_flags(4);
    pub const UCL_STRING_PARSE_INT: ucl_string_flags = ucl_string_flags(8);
    pub const UCL_STRING_PARSE_DOUBLE: ucl_string_flags = ucl_string_flags(16);
    pub const UCL_STRING_PARSE_TIME: ucl_string_flags = ucl_string_flags(32);
    pub const UCL_STRING_PARSE_NUMBER: ucl_string_flags = ucl_string_flags(56);
    pub const UCL_STRING_PARSE: ucl_string_flags = ucl_string_flags(60);
    pub const UCL_STRING_PARSE_BYTES: ucl_string_flags = ucl_string_flags(64);
}
impl ::std::ops::BitOr<ucl_string_flags> for ucl_string_flags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        ucl_string_flags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for ucl_string_flags {
    #[inline]
    fn bitor_assign(&mut self, rhs: ucl_string_flags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<ucl_string_flags> for ucl_string_flags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        ucl_string_flags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for ucl_string_flags {
    #[inline]
    fn bitand_assign(&mut self, rhs: ucl_string_flags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ucl_string_flags(pub ::std::os::raw::c_uint);
pub use self::ucl_string_flags as ucl_string_flags_t;
impl ucl_object_flags {
    pub const UCL_OBJECT_ALLOCATED_KEY: ucl_object_flags = ucl_object_flags(1);
    pub const UCL_OBJECT_ALLOCATED_VALUE: ucl_object_flags = ucl_object_flags(2);
    pub const UCL_OBJECT_NEED_KEY_ESCAPE: ucl_object_flags = ucl_object_flags(4);
    pub const UCL_OBJECT_EPHEMERAL: ucl_object_flags = ucl_object_flags(8);
    pub const UCL_OBJECT_MULTILINE: ucl_object_flags = ucl_object_flags(16);
    pub const UCL_OBJECT_MULTIVALUE: ucl_object_flags = ucl_object_flags(32);
    pub const UCL_OBJECT_INHERITED: ucl_object_flags = ucl_object_flags(64);
    pub const UCL_OBJECT_BINARY: ucl_object_flags = ucl_object_flags(128);
    pub const UCL_OBJECT_SQUOTED: ucl_object_flags = ucl_object_flags(256);
}
impl ::std::ops::BitOr<ucl_object_flags> for ucl_object_flags {
    type Output = Self;
    #[inline]
    fn bitor(self, other: Self) -> Self {
        ucl_object_flags(self.0 | other.0)
    }
}
impl ::std::ops::BitOrAssign for ucl_object_flags {
    #[inline]
    fn bitor_assign(&mut self, rhs: ucl_object_flags) {
        self.0 |= rhs.0;
    }
}
impl ::std::ops::BitAnd<ucl_object_flags> for ucl_object_flags {
    type Output = Self;
    #[inline]
    fn bitand(self, other: Self) -> Self {
        ucl_object_flags(self.0 & other.0)
    }
}
impl ::std::ops::BitAndAssign for ucl_object_flags {
    #[inline]
    fn bitand_assign(&mut self, rhs: ucl_object_flags) {
        self.0 &= rhs.0;
    }
}
#[repr(transparent)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub struct ucl_object_flags(pub ::std::os::raw::c_uint);
pub use self::ucl_object_flags as ucl_object_flags_t;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_duplicate_strategy {
    UCL_DUPLICATE_APPEND = 0,
    UCL_DUPLICATE_MERGE = 1,
    UCL_DUPLICATE_REWRITE = 2,
    UCL_DUPLICATE_ERROR = 3,
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_parse_type {
    UCL_PARSE_UCL = 0,
    UCL_PARSE_MSGPACK = 1,
    UCL_PARSE_CSEXP = 2,
    UCL_PARSE_AUTO = 3,
}
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct ucl_object_s {
    pub _bindgen_opaque_blob: [u64; 8usize],
}
#[repr(C)]
#[derive(Copy, Clone)]
pub union ucl_object_s__bindgen_ty_1 {
    pub iv: i64,
    pub sv: *const ::std::os::raw::c_char,
    pub dv: f64,
    pub av: *mut ::std::os::raw::c_void,
    pub ov: *mut ::std::os::raw::c_void,
    pub ud: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_object_s__bindgen_ty_1"]
        [::std::mem::size_of::<ucl_object_s__bindgen_ty_1>() - 8usize];
    ["Alignment of ucl_object_s__bindgen_ty_1"]
        [::std::mem::align_of::<ucl_object_s__bindgen_ty_1>() - 8usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::iv"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, iv) - 0usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::sv"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, sv) - 0usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::dv"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, dv) - 0usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::av"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, av) - 0usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::ov"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, ov) - 0usize];
    ["Offset of field: ucl_object_s__bindgen_ty_1::ud"]
        [::std::mem::offset_of!(ucl_object_s__bindgen_ty_1, ud) - 0usize];
};
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_object_s"][::std::mem::size_of::<ucl_object_s>() - 64usize];
    ["Alignment of ucl_object_s"][::std::mem::align_of::<ucl_object_s>() - 8usize];
};
pub type ucl_object_t = ucl_object_s;
pub type ucl_userdata_dtor =
    ::std::option::Option<unsafe extern "C" fn(ud: *mut ::std::os::raw::c_void)>;
pub type ucl_userdata_emitter = ::std::option::Option<
    unsafe extern "C" fn(ud: *mut ::std::os::raw::c_void) -> *const ::std::os::raw::c_char,
>;
unsafe extern "C" {
    pub fn ucl_copy_key_trash(obj: *const ucl_object_t) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_copy_value_trash(obj: *const ucl_object_t) -> *mut ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_new() -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_typed_new(type_: ucl_type_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_new_full(
        type_: ucl_type_t,
        priority: ::std::os::raw::c_uint,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_new_userdata(
        dtor: ucl_userdata_dtor,
        emitter: ucl_userdata_emitter,
        ptr: *mut ::std::os::raw::c_void,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_copy(other: *const ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_type(obj: *const ucl_object_t) -> ucl_type_t;
}
unsafe extern "C" {
    pub fn ucl_object_type_to_string(type_: ucl_type_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_string_to_type(
        input: *const ::std::os::raw::c_char,
        res: *mut ucl_type_t,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_fromstring_common(
        str_: *const ::std::os::raw::c_char,
        len: usize,
        flags: ucl_string_flags,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_fromstring(str_: *const ::std::os::raw::c_char) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_fromlstring(
        str_: *const ::std::os::raw::c_char,
        len: usize,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_fromint(iv: i64) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_fromdouble(dv: f64) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_frombool(bv: bool) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_insert_key(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
        copy_key: bool,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_replace_key(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
        copy_key: bool,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_merge(top: *mut ucl_object_t, elt: *mut ucl_object_t, copy: bool) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_delete_keyl(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_delete_key(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_pop_keyl(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_pop_key(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_insert_key_merged(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
        copy_key: bool,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_reserve(obj: *mut ucl_object_t, reserved: usize) -> bool;
}
unsafe extern "C" {
    pub fn ucl_array_append(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> bool;
}
unsafe extern "C" {
    pub fn ucl_array_prepend(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> bool;
}
unsafe extern "C" {
    pub fn ucl_array_merge(top: *mut ucl_object_t, elt: *mut ucl_object_t, copy: bool) -> bool;
}
unsafe extern "C" {
    pub fn ucl_array_delete(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_head(top: *const ucl_object_t) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_tail(top: *const ucl_object_t) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_pop_last(top: *mut ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_pop_first(top: *mut ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_size(top: *const ucl_object_t) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ucl_array_find_index(
        top: *const ucl_object_t,
        index: ::std::os::raw::c_uint,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_array_index_of(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
    ) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ucl_array_replace_index(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
        index: ::std::os::raw::c_uint,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_elt_append(head: *mut ucl_object_t, elt: *mut ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_todouble_safe(obj: *const ucl_object_t, target: *mut f64) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_todouble(obj: *const ucl_object_t) -> f64;
}
unsafe extern "C" {
    pub fn ucl_object_toint_safe(obj: *const ucl_object_t, target: *mut i64) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_toint(obj: *const ucl_object_t) -> i64;
}
unsafe extern "C" {
    pub fn ucl_object_toboolean_safe(obj: *const ucl_object_t, target: *mut bool) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_toboolean(obj: *const ucl_object_t) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_tostring_safe(
        obj: *const ucl_object_t,
        target: *mut *const ::std::os::raw::c_char,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_tostring(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_tostring_forced(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_tolstring_safe(
        obj: *const ucl_object_t,
        target: *mut *const ::std::os::raw::c_char,
        tlen: *mut usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_tolstring(
        obj: *const ucl_object_t,
        tlen: *mut usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_lookup(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_lookup_any(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
        ...
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_lookup_len(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
        klen: usize,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_lookup_path(
        obj: *const ucl_object_t,
        path: *const ::std::os::raw::c_char,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_lookup_path_char(
        obj: *const ucl_object_t,
        path: *const ::std::os::raw::c_char,
        sep: ::std::os::raw::c_char,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_key(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_keyl(
        obj: *const ucl_object_t,
        len: *mut usize,
    ) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_object_ref(obj: *const ucl_object_t) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_free(obj: *mut ucl_object_t);
}
unsafe extern "C" {
    pub fn ucl_object_unref(obj: *mut ucl_object_t);
}
unsafe extern "C" {
    pub fn ucl_object_compare(
        o1: *const ucl_object_t,
        o2: *const ucl_object_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn ucl_object_compare_qsort(
        o1: *mut *const ucl_object_t,
        o2: *mut *const ucl_object_t,
    ) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn ucl_object_array_sort(
        ar: *mut ucl_object_t,
        cmp: ::std::option::Option<
            unsafe extern "C" fn(
                o1: *mut *const ucl_object_t,
                o2: *mut *const ucl_object_t,
            ) -> ::std::os::raw::c_int,
        >,
    );
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_object_keys_sort_flags {
    UCL_SORT_KEYS_DEFAULT = 0,
    UCL_SORT_KEYS_ICASE = 1,
    UCL_SORT_KEYS_RECURSIVE = 2,
}
unsafe extern "C" {
    pub fn ucl_object_sort_keys(obj: *mut ucl_object_t, how: ucl_object_keys_sort_flags);
}
unsafe extern "C" {
    pub fn ucl_object_get_priority(obj: *const ucl_object_t) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ucl_object_set_priority(obj: *mut ucl_object_t, priority: ::std::os::raw::c_uint);
}
pub type ucl_object_iter_t = *mut ::std::os::raw::c_void;
unsafe extern "C" {
    pub fn ucl_object_iterate_with_error(
        obj: *const ucl_object_t,
        iter: *mut ucl_object_iter_t,
        expand_values: bool,
        ep: *mut ::std::os::raw::c_int,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_iterate_end(obj: *const ucl_object_t, iter: *mut ucl_object_iter_t);
}
unsafe extern "C" {
    pub fn ucl_object_iterate_new(obj: *const ucl_object_t) -> ucl_object_iter_t;
}
unsafe extern "C" {
    pub fn ucl_object_iter_chk_excpn(it: *mut ucl_object_iter_t) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_iterate_reset(
        it: ucl_object_iter_t,
        obj: *const ucl_object_t,
    ) -> ucl_object_iter_t;
}
unsafe extern "C" {
    pub fn ucl_object_iterate_safe(
        iter: ucl_object_iter_t,
        expand_values: bool,
    ) -> *const ucl_object_t;
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_iterate_type {
    UCL_ITERATE_EXPLICIT = 1,
    UCL_ITERATE_IMPLICIT = 2,
    UCL_ITERATE_BOTH = 3,
}
unsafe extern "C" {
    pub fn ucl_object_iterate_full(
        iter: ucl_object_iter_t,
        type_: ucl_iterate_type,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_object_iterate_free(it: ucl_object_iter_t);
}
pub type ucl_macro_handler = ::std::option::Option<
    unsafe extern "C" fn(
        data: *const ::std::os::raw::c_uchar,
        len: usize,
        arguments: *const ucl_object_t,
        ud: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
pub type ucl_context_macro_handler = ::std::option::Option<
    unsafe extern "C" fn(
        data: *const ::std::os::raw::c_uchar,
        len: usize,
        arguments: *const ucl_object_t,
        context: *const ucl_object_t,
        ud: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_parser {
    _unused: [u8; 0],
}
unsafe extern "C" {
    pub fn ucl_parser_new(flags: ::std::os::raw::c_int) -> *mut ucl_parser;
}
unsafe extern "C" {
    pub fn ucl_parser_set_default_priority(
        parser: *mut ucl_parser,
        prio: ::std::os::raw::c_uint,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_get_default_priority(parser: *mut ucl_parser) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn ucl_parser_register_macro(
        parser: *mut ucl_parser,
        macro_: *const ::std::os::raw::c_char,
        handler: ucl_macro_handler,
        ud: *mut ::std::os::raw::c_void,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_register_context_macro(
        parser: *mut ucl_parser,
        macro_: *const ::std::os::raw::c_char,
        handler: ucl_context_macro_handler,
        ud: *mut ::std::os::raw::c_void,
    ) -> bool;
}
pub type ucl_variable_handler = ::std::option::Option<
    unsafe extern "C" fn(
        data: *const ::std::os::raw::c_uchar,
        len: usize,
        replace: *mut *mut ::std::os::raw::c_uchar,
        replace_len: *mut usize,
        need_free: *mut bool,
        ud: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
unsafe extern "C" {
    pub fn ucl_parser_register_variable(
        parser: *mut ucl_parser,
        var: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn ucl_parser_set_variables_handler(
        parser: *mut ucl_parser,
        handler: ucl_variable_handler,
        ud: *mut ::std::os::raw::c_void,
    );
}
unsafe extern "C" {
    pub fn ucl_parser_add_chunk(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_chunk_priority(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
        priority: ::std::os::raw::c_uint,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_insert_chunk(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_chunk_full(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
        priority: ::std::os::raw::c_uint,
        strat: ucl_duplicate_strategy,
        parse_type: ucl_parse_type,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_string(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_char,
        len: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_string_priority(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_char,
        len: usize,
        priority: ::std::os::raw::c_uint,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_file(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_file_priority(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
        priority: ::std::os::raw::c_uint,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_file_full(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
        priority: ::std::os::raw::c_uint,
        strat: ucl_duplicate_strategy,
        parse_type: ucl_parse_type,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_fd(parser: *mut ucl_parser, fd: ::std::os::raw::c_int) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_fd_priority(
        parser: *mut ucl_parser,
        fd: ::std::os::raw::c_int,
        priority: ::std::os::raw::c_uint,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_add_fd_full(
        parser: *mut ucl_parser,
        fd: ::std::os::raw::c_int,
        priority: ::std::os::raw::c_uint,
        strat: ucl_duplicate_strategy,
        parse_type: ucl_parse_type,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_set_include_path(parser: *mut ucl_parser, paths: *mut ucl_object_t) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_get_object(parser: *mut ucl_parser) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_parser_get_current_stack_object(
        parser: *mut ucl_parser,
        depth: ::std::os::raw::c_uint,
    ) -> *mut ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_parser_chunk_peek(parser: *mut ucl_parser) -> ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub fn ucl_parser_chunk_skip(parser: *mut ucl_parser) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_get_error(parser: *mut ucl_parser) -> *const ::std::os::raw::c_char;
}
unsafe extern "C" {
    pub fn ucl_parser_get_error_code(parser: *mut ucl_parser) -> ::std::os::raw::c_int;
}
unsafe extern "C" {
    pub fn ucl_parser_get_column(parser: *mut ucl_parser) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ucl_parser_get_linenum(parser: *mut ucl_parser) -> ::std::os::raw::c_uint;
}
unsafe extern "C" {
    pub fn ucl_parser_clear_error(parser: *mut ucl_parser);
}
unsafe extern "C" {
    pub fn ucl_parser_free(parser: *mut ucl_parser);
}
unsafe extern "C" {
    pub fn ucl_parser_get_comments(parser: *mut ucl_parser) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_comments_find(
        comments: *const ucl_object_t,
        srch: *const ucl_object_t,
    ) -> *const ucl_object_t;
}
unsafe extern "C" {
    pub fn ucl_comments_move(
        comments: *mut ucl_object_t,
        from: *const ucl_object_t,
        to: *const ucl_object_t,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_comments_add(
        comments: *mut ucl_object_t,
        obj: *const ucl_object_t,
        comment: *const ::std::os::raw::c_char,
    );
}
unsafe extern "C" {
    pub fn ucl_parser_pubkey_add(
        parser: *mut ucl_parser,
        key: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_set_filevars(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
        need_expand: bool,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_parser_get_cur_file(parser: *mut ucl_parser) -> *const ::std::os::raw::c_char;
}
pub type ucl_parser_special_handler_t = ::std::option::Option<
    unsafe extern "C" fn(
        parser: *mut ucl_parser,
        source: *const ::std::os::raw::c_uchar,
        source_len: usize,
        destination: *mut *mut ::std::os::raw::c_uchar,
        dest_len: *mut usize,
        user_data: *mut ::std::os::raw::c_void,
    ) -> bool,
>;
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_special_handler_flags {
    UCL_SPECIAL_HANDLER_DEFAULT = 0,
    UCL_SPECIAL_HANDLER_PREPROCESS_ALL = 1,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_parser_special_handler {
    pub magic: *const ::std::os::raw::c_uchar,
    pub magic_len: usize,
    pub flags: ucl_special_handler_flags,
    pub handler: ucl_parser_special_handler_t,
    pub free_function: ::std::option::Option<
        unsafe extern "C" fn(
            data: *mut ::std::os::raw::c_uchar,
            len: usize,
            user_data: *mut ::std::os::raw::c_void,
        ),
    >,
    pub user_data: *mut ::std::os::raw::c_void,
    pub next: *mut ucl_parser_special_handler,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_parser_special_handler"]
        [::std::mem::size_of::<ucl_parser_special_handler>() - 56usize];
    ["Alignment of ucl_parser_special_handler"]
        [::std::mem::align_of::<ucl_parser_special_handler>() - 8usize];
    ["Offset of field: ucl_parser_special_handler::magic"]
        [::std::mem::offset_of!(ucl_parser_special_handler, magic) - 0usize];
    ["Offset of field: ucl_parser_special_handler::magic_len"]
        [::std::mem::offset_of!(ucl_parser_special_handler, magic_len) - 8usize];
    ["Offset of field: ucl_parser_special_handler::flags"]
        [::std::mem::offset_of!(ucl_parser_special_handler, flags) - 16usize];
    ["Offset of field: ucl_parser_special_handler::handler"]
        [::std::mem::offset_of!(ucl_parser_special_handler, handler) - 24usize];
    ["Offset of field: ucl_parser_special_handler::free_function"]
        [::std::mem::offset_of!(ucl_parser_special_handler, free_function) - 32usize];
    ["Offset of field: ucl_parser_special_handler::user_data"]
        [::std::mem::offset_of!(ucl_parser_special_handler, user_data) - 40usize];
    ["Offset of field: ucl_parser_special_handler::next"]
        [::std::mem::offset_of!(ucl_parser_special_handler, next) - 48usize];
};
unsafe extern "C" {
    pub fn ucl_parser_add_special_handler(
        parser: *mut ucl_parser,
        handler: *mut ucl_parser_special_handler,
    );
}
pub type ucl_include_trace_func_t = ::std::option::Option<
    unsafe extern "C" fn(
        parser: *mut ucl_parser,
        parent: *const ucl_object_t,
        args: *const ucl_object_t,
        path: *const ::std::os::raw::c_char,
        pathlen: usize,
        user_data: *mut ::std::os::raw::c_void,
    ),
>;
unsafe extern "C" {
    pub fn ucl_parser_set_include_tracer(
        parser: *mut ucl_parser,
        func: ucl_include_trace_func_t,
        user_data: *mut ::std::os::raw::c_void,
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_functions {
    pub ucl_emitter_append_character: ::std::option::Option<
        unsafe extern "C" fn(
            c: ::std::os::raw::c_uchar,
            nchars: usize,
            ud: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    pub ucl_emitter_append_len: ::std::option::Option<
        unsafe extern "C" fn(
            str_: *const ::std::os::raw::c_uchar,
            len: usize,
            ud: *mut ::std::os::raw::c_void,
        ) -> ::std::os::raw::c_int,
    >,
    pub ucl_emitter_append_int: ::std::option::Option<
        unsafe extern "C" fn(elt: i64, ud: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    pub ucl_emitter_append_double: ::std::option::Option<
        unsafe extern "C" fn(elt: f64, ud: *mut ::std::os::raw::c_void) -> ::std::os::raw::c_int,
    >,
    pub ucl_emitter_free_func:
        ::std::option::Option<unsafe extern "C" fn(ud: *mut ::std::os::raw::c_void)>,
    pub ud: *mut ::std::os::raw::c_void,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_emitter_functions"][::std::mem::size_of::<ucl_emitter_functions>() - 48usize];
    ["Alignment of ucl_emitter_functions"]
        [::std::mem::align_of::<ucl_emitter_functions>() - 8usize];
    ["Offset of field: ucl_emitter_functions::ucl_emitter_append_character"]
        [::std::mem::offset_of!(ucl_emitter_functions, ucl_emitter_append_character) - 0usize];
    ["Offset of field: ucl_emitter_functions::ucl_emitter_append_len"]
        [::std::mem::offset_of!(ucl_emitter_functions, ucl_emitter_append_len) - 8usize];
    ["Offset of field: ucl_emitter_functions::ucl_emitter_append_int"]
        [::std::mem::offset_of!(ucl_emitter_functions, ucl_emitter_append_int) - 16usize];
    ["Offset of field: ucl_emitter_functions::ucl_emitter_append_double"]
        [::std::mem::offset_of!(ucl_emitter_functions, ucl_emitter_append_double) - 24usize];
    ["Offset of field: ucl_emitter_functions::ucl_emitter_free_func"]
        [::std::mem::offset_of!(ucl_emitter_functions, ucl_emitter_free_func) - 32usize];
    ["Offset of field: ucl_emitter_functions::ud"]
        [::std::mem::offset_of!(ucl_emitter_functions, ud) - 40usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_operations {
    pub ucl_emitter_write_elt: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ucl_emitter_context,
            obj: *const ucl_object_t,
            first: bool,
            print_key: bool,
        ),
    >,
    pub ucl_emitter_start_object: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ucl_emitter_context,
            obj: *const ucl_object_t,
            first: bool,
            print_key: bool,
        ),
    >,
    pub ucl_emitter_end_object: ::std::option::Option<
        unsafe extern "C" fn(ctx: *mut ucl_emitter_context, obj: *const ucl_object_t),
    >,
    pub ucl_emitter_start_array: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ucl_emitter_context,
            obj: *const ucl_object_t,
            first: bool,
            print_key: bool,
        ),
    >,
    pub ucl_emitter_end_array: ::std::option::Option<
        unsafe extern "C" fn(ctx: *mut ucl_emitter_context, obj: *const ucl_object_t),
    >,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_emitter_operations"][::std::mem::size_of::<ucl_emitter_operations>() - 40usize];
    ["Alignment of ucl_emitter_operations"]
        [::std::mem::align_of::<ucl_emitter_operations>() - 8usize];
    ["Offset of field: ucl_emitter_operations::ucl_emitter_write_elt"]
        [::std::mem::offset_of!(ucl_emitter_operations, ucl_emitter_write_elt) - 0usize];
    ["Offset of field: ucl_emitter_operations::ucl_emitter_start_object"]
        [::std::mem::offset_of!(ucl_emitter_operations, ucl_emitter_start_object) - 8usize];
    ["Offset of field: ucl_emitter_operations::ucl_emitter_end_object"]
        [::std::mem::offset_of!(ucl_emitter_operations, ucl_emitter_end_object) - 16usize];
    ["Offset of field: ucl_emitter_operations::ucl_emitter_start_array"]
        [::std::mem::offset_of!(ucl_emitter_operations, ucl_emitter_start_array) - 24usize];
    ["Offset of field: ucl_emitter_operations::ucl_emitter_end_array"]
        [::std::mem::offset_of!(ucl_emitter_operations, ucl_emitter_end_array) - 32usize];
};
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_context {
    pub name: *const ::std::os::raw::c_char,
    pub id: ::std::os::raw::c_int,
    pub func: *const ucl_emitter_functions,
    pub ops: *const ucl_emitter_operations,
    pub indent: ::std::os::raw::c_uint,
    pub top: *const ucl_object_t,
    pub comments: *const ucl_object_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_emitter_context"][::std::mem::size_of::<ucl_emitter_context>() - 56usize];
    ["Alignment of ucl_emitter_context"][::std::mem::align_of::<ucl_emitter_context>() - 8usize];
    ["Offset of field: ucl_emitter_context::name"]
        [::std::mem::offset_of!(ucl_emitter_context, name) - 0usize];
    ["Offset of field: ucl_emitter_context::id"]
        [::std::mem::offset_of!(ucl_emitter_context, id) - 8usize];
    ["Offset of field: ucl_emitter_context::func"]
        [::std::mem::offset_of!(ucl_emitter_context, func) - 16usize];
    ["Offset of field: ucl_emitter_context::ops"]
        [::std::mem::offset_of!(ucl_emitter_context, ops) - 24usize];
    ["Offset of field: ucl_emitter_context::indent"]
        [::std::mem::offset_of!(ucl_emitter_context, indent) - 32usize];
    ["Offset of field: ucl_emitter_context::top"]
        [::std::mem::offset_of!(ucl_emitter_context, top) - 40usize];
    ["Offset of field: ucl_emitter_context::comments"]
        [::std::mem::offset_of!(ucl_emitter_context, comments) - 48usize];
};
unsafe extern "C" {
    pub fn ucl_object_emit(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
    ) -> *mut ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub fn ucl_object_emit_len(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
        len: *mut usize,
    ) -> *mut ::std::os::raw::c_uchar;
}
unsafe extern "C" {
    pub fn ucl_object_emit_full(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
        emitter: *mut ucl_emitter_functions,
        comments: *const ucl_object_t,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_emit_streamline_new(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
        emitter: *mut ucl_emitter_functions,
    ) -> *mut ucl_emitter_context;
}
unsafe extern "C" {
    pub fn ucl_object_emit_streamline_start_container(
        ctx: *mut ucl_emitter_context,
        obj: *const ucl_object_t,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_emit_streamline_add_object(
        ctx: *mut ucl_emitter_context,
        obj: *const ucl_object_t,
    );
}
unsafe extern "C" {
    pub fn ucl_object_emit_streamline_end_container(ctx: *mut ucl_emitter_context);
}
unsafe extern "C" {
    pub fn ucl_object_emit_streamline_finish(ctx: *mut ucl_emitter_context);
}
unsafe extern "C" {
    pub fn ucl_object_emit_memory_funcs(
        pmem: *mut *mut ::std::os::raw::c_void,
    ) -> *mut ucl_emitter_functions;
}
unsafe extern "C" {
    pub fn ucl_object_emit_fd_funcs(fd: ::std::os::raw::c_int) -> *mut ucl_emitter_functions;
}
unsafe extern "C" {
    pub fn ucl_object_emit_funcs_free(f: *mut ucl_emitter_functions);
}
#[repr(u32)]
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq)]
pub enum ucl_schema_error_code {
    UCL_SCHEMA_OK = 0,
    UCL_SCHEMA_TYPE_MISMATCH = 1,
    UCL_SCHEMA_INVALID_SCHEMA = 2,
    UCL_SCHEMA_MISSING_PROPERTY = 3,
    UCL_SCHEMA_CONSTRAINT = 4,
    UCL_SCHEMA_MISSING_DEPENDENCY = 5,
    UCL_SCHEMA_EXTERNAL_REF_MISSING = 6,
    UCL_SCHEMA_EXTERNAL_REF_INVALID = 7,
    UCL_SCHEMA_INTERNAL_ERROR = 8,
    UCL_SCHEMA_UNKNOWN = 9,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_schema_error {
    pub code: ucl_schema_error_code,
    pub msg: [::std::os::raw::c_char; 128usize],
    pub obj: *const ucl_object_t,
}
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
const _: () = {
    ["Size of ucl_schema_error"][::std::mem::size_of::<ucl_schema_error>() - 144usize];
    ["Alignment of ucl_schema_error"][::std::mem::align_of::<ucl_schema_error>() - 8usize];
    ["Offset of field: ucl_schema_error::code"]
        [::std::mem::offset_of!(ucl_schema_error, code) - 0usize];
    ["Offset of field: ucl_schema_error::msg"]
        [::std::mem::offset_of!(ucl_schema_error, msg) - 4usize];
    ["Offset of field: ucl_schema_error::obj"]
        [::std::mem::offset_of!(ucl_schema_error, obj) - 136usize];
};
unsafe extern "C" {
    pub fn ucl_object_validate(
        schema: *const ucl_object_t,
        obj: *const ucl_object_t,
        err: *mut ucl_schema_error,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_validate_root(
        schema: *const ucl_object_t,
        obj: *const ucl_object_t,
        root: *const ucl_object_t,
        err: *mut ucl_schema_error,
    ) -> bool;
}
unsafe extern "C" {
    pub fn ucl_object_validate_root_ext(
        schema: *const ucl_object_t,
        obj: *const ucl_object_t,
        root: *const ucl_object_t,
        ext_refs: *mut ucl_object_t,
        err: *mut ucl_schema_error,
    ) -> bool;
}