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
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
/* automatically generated by rust-bindgen */

#![allow(non_camel_case_types)]

pub type __int64_t = ::std::os::raw::c_long;
pub type __uint64_t = ::std::os::raw::c_ulong;
pub type __size_t = __uint64_t;
pub type __off_t = __int64_t;
pub type fpos_t = __off_t;
#[repr(u32)]
#[doc = " The common error codes returned by ucl parser"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_error {
    #[doc = "< No error"]
    UCL_EOK = 0,
    #[doc = "< Syntax error occurred during parsing"]
    UCL_ESYNTAX = 1,
    #[doc = "< IO error occurred during parsing"]
    UCL_EIO = 2,
    #[doc = "< Invalid state machine state"]
    UCL_ESTATE = 3,
    #[doc = "< Input has too many recursion levels"]
    UCL_ENESTED = 4,
    #[doc = "< Error processing a macro"]
    UCL_EMACRO = 5,
    #[doc = "< Internal unclassified error"]
    UCL_EINTERNAL = 6,
    #[doc = "< SSL error"]
    UCL_ESSL = 7,
    #[doc = "< A merge error occurred"]
    UCL_EMERGE = 8,
}
pub use self::ucl_error as ucl_error_t;
#[repr(u32)]
#[doc = " #ucl_object_t may have one of specified types, some types are compatible with each other and some are not."]
#[doc = " For example, you can always convert #UCL_TIME to #UCL_FLOAT. Also you can convert #UCL_FLOAT to #UCL_INTEGER"]
#[doc = " by loosing floating point. Every object may be converted to a string by #ucl_object_tostring_forced() function."]
#[doc = ""]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_type {
    #[doc = "< UCL object - key/value pairs"]
    UCL_OBJECT = 0,
    #[doc = "< UCL array"]
    UCL_ARRAY = 1,
    #[doc = "< Integer number"]
    UCL_INT = 2,
    #[doc = "< Floating point number"]
    UCL_FLOAT = 3,
    #[doc = "< Null terminated string"]
    UCL_STRING = 4,
    #[doc = "< Boolean value"]
    UCL_BOOLEAN = 5,
    #[doc = "< Time value (floating point number of seconds)"]
    UCL_TIME = 6,
    #[doc = "< Opaque userdata pointer (may be used in macros)"]
    UCL_USERDATA = 7,
    #[doc = "< Null value"]
    UCL_NULL = 8,
}
pub use self::ucl_type as ucl_type_t;
#[repr(u32)]
#[doc = " You can use one of these types to serialise #ucl_object_t by using ucl_object_emit()."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_emitter {
    #[doc = "< Emit fine formatted JSON"]
    UCL_EMIT_JSON = 0,
    #[doc = "< Emit compacted JSON"]
    UCL_EMIT_JSON_COMPACT = 1,
    #[doc = "< Emit human readable config format"]
    UCL_EMIT_CONFIG = 2,
    #[doc = "< Emit embedded YAML format"]
    UCL_EMIT_YAML = 3,
    #[doc = "< Emit msgpack output"]
    UCL_EMIT_MSGPACK = 4,
    #[doc = "< Unsupported emitter type"]
    UCL_EMIT_MAX = 5,
}
pub use self::ucl_emitter as ucl_emitter_t;
impl ucl_parser_flags {
    #[doc = "< No special flags"]
    pub const UCL_PARSER_DEFAULT: ucl_parser_flags = ucl_parser_flags(0);
}
impl ucl_parser_flags {
    #[doc = "< Convert all keys to lower case"]
    pub const UCL_PARSER_KEY_LOWERCASE: ucl_parser_flags = ucl_parser_flags(1);
}
impl ucl_parser_flags {
    #[doc = "< Parse input in zero-copy mode if possible"]
    pub const UCL_PARSER_ZEROCOPY: ucl_parser_flags = ucl_parser_flags(2);
}
impl ucl_parser_flags {
    #[doc = "< Do not parse time and treat time values as strings"]
    pub const UCL_PARSER_NO_TIME: ucl_parser_flags = ucl_parser_flags(4);
}
impl ucl_parser_flags {
    pub const UCL_PARSER_NO_IMPLICIT_ARRAYS: ucl_parser_flags = ucl_parser_flags(8);
}
impl ucl_parser_flags {
    #[doc = " Create explicit arrays instead of implicit ones"]
    pub const UCL_PARSER_SAVE_COMMENTS: ucl_parser_flags = ucl_parser_flags(16);
}
impl ucl_parser_flags {
    #[doc = " Save comments in the parser context"]
    pub const UCL_PARSER_DISABLE_MACRO: ucl_parser_flags = ucl_parser_flags(32);
}
impl ucl_parser_flags {
    #[doc = " Treat macros as comments"]
    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)]
#[doc = " These flags defines parser behaviour. If you specify #UCL_PARSER_ZEROCOPY you must ensure"]
#[doc = " that the input memory is not freed if an object is in use. Moreover, if you want to use"]
#[doc = " zero-terminated keys and string values then you should not use zero-copy mode, as in this case"]
#[doc = " UCL still has to perform copying implicitly."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct ucl_parser_flags(pub u32);
pub use self::ucl_parser_flags as ucl_parser_flags_t;
impl ucl_string_flags {
    #[doc = "< Treat string as is"]
    pub const UCL_STRING_RAW: ucl_string_flags = ucl_string_flags(0);
}
impl ucl_string_flags {
    #[doc = "< Perform JSON escape"]
    pub const UCL_STRING_ESCAPE: ucl_string_flags = ucl_string_flags(1);
}
impl ucl_string_flags {
    #[doc = "< Trim leading and trailing whitespaces"]
    pub const UCL_STRING_TRIM: ucl_string_flags = ucl_string_flags(2);
}
impl ucl_string_flags {
    #[doc = "< Parse passed string and detect boolean"]
    pub const UCL_STRING_PARSE_BOOLEAN: ucl_string_flags = ucl_string_flags(4);
}
impl ucl_string_flags {
    #[doc = "< Parse passed string and detect integer number"]
    pub const UCL_STRING_PARSE_INT: ucl_string_flags = ucl_string_flags(8);
}
impl ucl_string_flags {
    #[doc = "< Parse passed string and detect integer or float number"]
    pub const UCL_STRING_PARSE_DOUBLE: ucl_string_flags = ucl_string_flags(16);
}
impl ucl_string_flags {
    #[doc = "< Parse time strings"]
    pub const UCL_STRING_PARSE_TIME: ucl_string_flags = ucl_string_flags(32);
}
impl ucl_string_flags {
    #[doc = "<"]
    #[doc = "Parse passed string and detect number"]
    pub const UCL_STRING_PARSE_NUMBER: ucl_string_flags = ucl_string_flags(56);
}
impl ucl_string_flags {
    #[doc = "<"]
    #[doc = "Parse passed string (and detect booleans and numbers)"]
    pub const UCL_STRING_PARSE: ucl_string_flags = ucl_string_flags(60);
}
impl ucl_string_flags {
    #[doc = "< Treat numbers as bytes"]
    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)]
#[doc = " String conversion flags, that are used in #ucl_object_fromstring_common function."]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct ucl_string_flags(pub u32);
pub use self::ucl_string_flags as ucl_string_flags_t;
impl ucl_object_flags {
    #[doc = "< An object has key allocated internally"]
    pub const UCL_OBJECT_ALLOCATED_KEY: ucl_object_flags = ucl_object_flags(1);
}
impl ucl_object_flags {
    #[doc = "< An object has a string value allocated internally"]
    pub const UCL_OBJECT_ALLOCATED_VALUE: ucl_object_flags = ucl_object_flags(2);
}
impl ucl_object_flags {
    #[doc = "< The key of an object need to be escaped on output"]
    pub const UCL_OBJECT_NEED_KEY_ESCAPE: ucl_object_flags = ucl_object_flags(4);
}
impl ucl_object_flags {
    #[doc = "< Temporary object that does not need to be freed really"]
    pub const UCL_OBJECT_EPHEMERAL: ucl_object_flags = ucl_object_flags(8);
}
impl ucl_object_flags {
    #[doc = "< String should be displayed as multiline string"]
    pub const UCL_OBJECT_MULTILINE: ucl_object_flags = ucl_object_flags(16);
}
impl ucl_object_flags {
    #[doc = "< Object is a key with multiple values"]
    pub const UCL_OBJECT_MULTIVALUE: ucl_object_flags = ucl_object_flags(32);
}
impl ucl_object_flags {
    #[doc = "< Object has been inherited from another"]
    pub const UCL_OBJECT_INHERITED: ucl_object_flags = ucl_object_flags(64);
}
impl ucl_object_flags {
    #[doc = "< Object contains raw binary data"]
    pub const UCL_OBJECT_BINARY: ucl_object_flags = ucl_object_flags(128);
}
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)]
#[doc = " Basic flags for an object"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct ucl_object_flags(pub u32);
pub use self::ucl_object_flags as ucl_object_flags_t;
#[repr(u32)]
#[doc = " Duplicate policy types"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_duplicate_strategy {
    #[doc = "< Default policy to merge based on priorities"]
    UCL_DUPLICATE_APPEND = 0,
    #[doc = "< Merge new object with old one"]
    UCL_DUPLICATE_MERGE = 1,
    #[doc = "< Rewrite old keys"]
    UCL_DUPLICATE_REWRITE = 2,
    #[doc = "< Stop parsing on duplicate found"]
    UCL_DUPLICATE_ERROR = 3,
}
#[repr(u32)]
#[doc = " Input format type"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_parse_type {
    #[doc = "< Default ucl format"]
    UCL_PARSE_UCL = 0,
    #[doc = "< Message pack input format"]
    UCL_PARSE_MSGPACK = 1,
    #[doc = "< Canonical S-expressions"]
    UCL_PARSE_CSEXP = 2,
    #[doc = "< Try to detect parse type"]
    UCL_PARSE_AUTO = 3,
}
#[doc = " UCL object structure. Please mention that the most of fields should not be touched by"]
#[doc = " UCL users. In future, this structure may be converted to private one."]
#[repr(C)]
#[repr(align(8))]
#[derive(Debug, Copy, Clone)]
pub struct ucl_object_s {
    pub _bindgen_opaque_blob: [u64; 8usize],
}
#[doc = " Variant value type"]
#[repr(C)]
#[derive(Copy, Clone)]
pub union ucl_object_s__bindgen_ty_1 {
    #[doc = "< Int value of an object"]
    pub iv: i64,
    #[doc = "< String value of an object"]
    pub sv: *const ::std::os::raw::c_char,
    #[doc = "< Double value of an object"]
    pub dv: f64,
    #[doc = "< Array"]
    pub av: *mut ::std::os::raw::c_void,
    #[doc = "< Object"]
    pub ov: *mut ::std::os::raw::c_void,
    #[doc = "< Opaque user data"]
    pub ud: *mut ::std::os::raw::c_void,
    _bindgen_union_align: u64,
}
#[test]
fn bindgen_test_layout_ucl_object_s__bindgen_ty_1() {
    assert_eq!(
        ::std::mem::size_of::<ucl_object_s__bindgen_ty_1>(),
        8usize,
        concat!("Size of: ", stringify!(ucl_object_s__bindgen_ty_1))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_object_s__bindgen_ty_1>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_object_s__bindgen_ty_1))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).iv as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(iv)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).sv as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(sv)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).dv as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(dv)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).av as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(av)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).ov as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(ov)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_object_s__bindgen_ty_1>())).ud as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_object_s__bindgen_ty_1),
            "::",
            stringify!(ud)
        )
    );
}
#[test]
fn bindgen_test_layout_ucl_object_s() {
    assert_eq!(
        ::std::mem::size_of::<ucl_object_s>(),
        64usize,
        concat!("Size of: ", stringify!(ucl_object_s))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_object_s>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_object_s))
    );
}
pub type ucl_object_t = ucl_object_s;
#[doc = " Destructor type for userdata objects"]
#[doc = " @param ud user specified data pointer"]
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,
>;
extern "C" {
    #[doc = " @defgroup utils Utility functions"]
    #[doc = " A number of utility functions simplify handling of UCL objects"]
    #[doc = ""]
    #[doc = " @{"]
    #[doc = " Copy and return a key of an object, returned key is zero-terminated"]
    #[doc = " @param obj CL object"]
    #[doc = " @return zero terminated key"]
    pub fn ucl_copy_key_trash(obj: *const ucl_object_t) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Copy and return a string value of an object, returned key is zero-terminated"]
    #[doc = " @param obj CL object"]
    #[doc = " @return zero terminated string representation of object value"]
    pub fn ucl_copy_value_trash(obj: *const ucl_object_t) -> *mut ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Creates a new object"]
    #[doc = " @return new object"]
    pub fn ucl_object_new() -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create new object with type specified"]
    #[doc = " @param type type of a new object"]
    #[doc = " @return new object"]
    pub fn ucl_object_typed_new(type_: ucl_type_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create new object with type and priority specified"]
    #[doc = " @param type type of a new object"]
    #[doc = " @param priority priority of an object"]
    #[doc = " @return new object"]
    pub fn ucl_object_new_full(
        type_: ucl_type_t,
        priority: ::std::os::raw::c_uint,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create new object with userdata dtor"]
    #[doc = " @param dtor destructor function"]
    #[doc = " @param emitter emitter for userdata"]
    #[doc = " @param ptr opaque pointer"]
    #[doc = " @return new object"]
    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;
}
extern "C" {
    #[doc = " Perform deep copy of an object copying everything"]
    #[doc = " @param other object to copy"]
    #[doc = " @return new object with refcount equal to 1"]
    pub fn ucl_object_copy(other: *const ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Return the type of an object"]
    #[doc = " @return the object type"]
    pub fn ucl_object_type(obj: *const ucl_object_t) -> ucl_type_t;
}
extern "C" {
    #[doc = " Converts ucl object type to its string representation"]
    #[doc = " @param type type of object"]
    #[doc = " @return constant string describing type"]
    pub fn ucl_object_type_to_string(type_: ucl_type_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Converts string that represents ucl type to real ucl type enum"]
    #[doc = " @param input C string with name of type"]
    #[doc = " @param res resulting target"]
    #[doc = " @return true if `input` is a name of type stored in `res`"]
    pub fn ucl_object_string_to_type(
        input: *const ::std::os::raw::c_char,
        res: *mut ucl_type_t,
    ) -> bool;
}
extern "C" {
    #[doc = " Convert any string to an ucl object making the specified transformations"]
    #[doc = " @param str fixed size or NULL terminated string"]
    #[doc = " @param len length (if len is zero, than str is treated as NULL terminated)"]
    #[doc = " @param flags conversion flags"]
    #[doc = " @return new object"]
    pub fn ucl_object_fromstring_common(
        str: *const ::std::os::raw::c_char,
        len: usize,
        flags: ucl_string_flags,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create a UCL object from the specified string"]
    #[doc = " @param str NULL terminated string, will be json escaped"]
    #[doc = " @return new object"]
    pub fn ucl_object_fromstring(str: *const ::std::os::raw::c_char) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create a UCL object from the specified string"]
    #[doc = " @param str fixed size string, will be json escaped"]
    #[doc = " @param len length of a string"]
    #[doc = " @return new object"]
    pub fn ucl_object_fromlstring(
        str: *const ::std::os::raw::c_char,
        len: usize,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create an object from an integer number"]
    #[doc = " @param iv number"]
    #[doc = " @return new object"]
    pub fn ucl_object_fromint(iv: i64) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create an object from a float number"]
    #[doc = " @param dv number"]
    #[doc = " @return new object"]
    pub fn ucl_object_fromdouble(dv: f64) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Create an object from a boolean"]
    #[doc = " @param bv bool value"]
    #[doc = " @return new object"]
    pub fn ucl_object_frombool(bv: bool) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Insert a object 'elt' to the hash 'top' and associate it with key 'key'"]
    #[doc = " @param top destination object (must be of type UCL_OBJECT)"]
    #[doc = " @param elt element to insert (must NOT be NULL)"]
    #[doc = " @param key key to associate with this object (either const or preallocated)"]
    #[doc = " @param keylen length of the key (or 0 for NULL terminated keys)"]
    #[doc = " @param copy_key make an internal copy of key"]
    #[doc = " @return true if key has been inserted"]
    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;
}
extern "C" {
    #[doc = " Replace a object 'elt' to the hash 'top' and associate it with key 'key', old object will be unrefed,"]
    #[doc = " if no object has been found this function works like ucl_object_insert_key()"]
    #[doc = " @param top destination object (must be of type UCL_OBJECT)"]
    #[doc = " @param elt element to insert (must NOT be NULL)"]
    #[doc = " @param key key to associate with this object (either const or preallocated)"]
    #[doc = " @param keylen length of the key (or 0 for NULL terminated keys)"]
    #[doc = " @param copy_key make an internal copy of key"]
    #[doc = " @return true if key has been inserted"]
    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;
}
extern "C" {
    #[doc = " Merge the keys from one object to another object. Overwrite on conflict"]
    #[doc = " @param top destination object (must be of type UCL_OBJECT)"]
    #[doc = " @param elt element to insert (must be of type UCL_OBJECT)"]
    #[doc = " @param copy copy rather than reference the elements"]
    #[doc = " @return true if all keys have been merged"]
    pub fn ucl_object_merge(top: *mut ucl_object_t, elt: *mut ucl_object_t, copy: bool) -> bool;
}
extern "C" {
    #[doc = " Delete a object associated with key 'key', old object will be unrefered,"]
    #[doc = " @param top object"]
    #[doc = " @param key key associated to the object to remove"]
    #[doc = " @param keylen length of the key (or 0 for NULL terminated keys)"]
    pub fn ucl_object_delete_keyl(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Delete a object associated with key 'key', old object will be unrefered,"]
    #[doc = " @param top object"]
    #[doc = " @param key key associated to the object to remove"]
    pub fn ucl_object_delete_key(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " Removes `key` from `top` object, returning the object that was removed. This"]
    #[doc = " object is not released, caller must unref the returned object when it is no"]
    #[doc = " longer needed."]
    #[doc = " @param top object"]
    #[doc = " @param key key to remove"]
    #[doc = " @param keylen length of the key (or 0 for NULL terminated keys)"]
    #[doc = " @return removed object or NULL if object has not been found"]
    pub fn ucl_object_pop_keyl(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
        keylen: usize,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Removes `key` from `top` object returning the object that was removed. This"]
    #[doc = " object is not released, caller must unref the returned object when it is no"]
    #[doc = " longer needed."]
    #[doc = " @param top object"]
    #[doc = " @param key key to remove"]
    #[doc = " @return removed object or NULL if object has not been found"]
    pub fn ucl_object_pop_key(
        top: *mut ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Insert a object 'elt' to the hash 'top' and associate it with key 'key', if"]
    #[doc = " the specified key exist, try to merge its content"]
    #[doc = " @param top destination object (must be of type UCL_OBJECT)"]
    #[doc = " @param elt element to insert (must NOT be NULL)"]
    #[doc = " @param key key to associate with this object (either const or preallocated)"]
    #[doc = " @param keylen length of the key (or 0 for NULL terminated keys)"]
    #[doc = " @param copy_key make an internal copy of key"]
    #[doc = " @return true if key has been inserted"]
    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;
}
extern "C" {
    #[doc = " Reserve space in ucl array or object for `elt` elements"]
    #[doc = " @param obj object to reserve"]
    #[doc = " @param reserved size to reserve in an object"]
    pub fn ucl_object_reserve(obj: *mut ucl_object_t, reserved: usize);
}
extern "C" {
    #[doc = " Append an element to the end of array object"]
    #[doc = " @param top destination object (must NOT be NULL)"]
    #[doc = " @param elt element to append (must NOT be NULL)"]
    #[doc = " @return true if value has been inserted"]
    pub fn ucl_array_append(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> bool;
}
extern "C" {
    #[doc = " Append an element to the start of array object"]
    #[doc = " @param top destination object (must NOT be NULL)"]
    #[doc = " @param elt element to append (must NOT be NULL)"]
    #[doc = " @return true if value has been inserted"]
    pub fn ucl_array_prepend(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> bool;
}
extern "C" {
    #[doc = " Merge all elements of second array into the first array"]
    #[doc = " @param top destination array (must be of type UCL_ARRAY)"]
    #[doc = " @param elt array to copy elements from (must be of type UCL_ARRAY)"]
    #[doc = " @param copy copy elements instead of referencing them"]
    #[doc = " @return true if arrays were merged"]
    pub fn ucl_array_merge(top: *mut ucl_object_t, elt: *mut ucl_object_t, copy: bool) -> bool;
}
extern "C" {
    #[doc = " Removes an element `elt` from the array `top`, returning the object that was"]
    #[doc = " removed. This object is not released, caller must unref the returned object"]
    #[doc = " when it is no longer needed."]
    #[doc = " @param top array ucl object"]
    #[doc = " @param elt element to remove"]
    #[doc = " @return removed element or NULL if `top` is NULL or not an array"]
    pub fn ucl_array_delete(top: *mut ucl_object_t, elt: *mut ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Returns the first element of the array `top`"]
    #[doc = " @param top array ucl object"]
    #[doc = " @return element or NULL if `top` is NULL or not an array"]
    pub fn ucl_array_head(top: *const ucl_object_t) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Returns the last element of the array `top`"]
    #[doc = " @param top array ucl object"]
    #[doc = " @return element or NULL if `top` is NULL or not an array"]
    pub fn ucl_array_tail(top: *const ucl_object_t) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Removes the last element from the array `top`, returning the object that was"]
    #[doc = " removed. This object is not released, caller must unref the returned object"]
    #[doc = " when it is no longer needed."]
    #[doc = " @param top array ucl object"]
    #[doc = " @return removed element or NULL if `top` is NULL or not an array"]
    pub fn ucl_array_pop_last(top: *mut ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Removes the first element from the array `top`, returning the object that was"]
    #[doc = " removed. This object is not released, caller must unref the returned object"]
    #[doc = " when it is no longer needed."]
    #[doc = " @param top array ucl object"]
    #[doc = " @return removed element or NULL if `top` is NULL or not an array"]
    pub fn ucl_array_pop_first(top: *mut ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Return size of the array `top`"]
    #[doc = " @param top object to get size from (must be of type UCL_ARRAY)"]
    #[doc = " @return size of the array"]
    pub fn ucl_array_size(top: *const ucl_object_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " Return object identified by index of the array `top`"]
    #[doc = " @param top object to get a key from (must be of type UCL_ARRAY)"]
    #[doc = " @param index array index to return"]
    #[doc = " @return object at the specified index or NULL if index is not found"]
    pub fn ucl_array_find_index(
        top: *const ucl_object_t,
        index: ::std::os::raw::c_uint,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Return the index of `elt` in the array `top`"]
    #[doc = " @param top object to get a key from (must be of type UCL_ARRAY)"]
    #[doc = " @param elt element to find index of (must NOT be NULL)"]
    #[doc = " @return index of `elt` in the array `top or (unsigned int)-1 if `elt` is not found"]
    pub fn ucl_array_index_of(
        top: *mut ucl_object_t,
        elt: *mut ucl_object_t,
    ) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " Replace an element in an array with a different element, returning the object"]
    #[doc = " that was replaced. This object is not released, caller must unref the"]
    #[doc = " returned object when it is no longer needed."]
    #[doc = " @param top destination object (must be of type UCL_ARRAY)"]
    #[doc = " @param elt element to append (must NOT be NULL)"]
    #[doc = " @param index array index in destination to overwrite with elt"]
    #[doc = " @return object that was replaced or NULL if index is not found"]
    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;
}
extern "C" {
    #[doc = " Append a element to another element forming an implicit array"]
    #[doc = " @param head head to append (may be NULL)"]
    #[doc = " @param elt new element"]
    #[doc = " @return the new implicit array"]
    pub fn ucl_elt_append(head: *mut ucl_object_t, elt: *mut ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Converts an object to double value"]
    #[doc = " @param obj CL object"]
    #[doc = " @param target target double variable"]
    #[doc = " @return true if conversion was successful"]
    pub fn ucl_object_todouble_safe(obj: *const ucl_object_t, target: *mut f64) -> bool;
}
extern "C" {
    #[doc = " Unsafe version of \\ref ucl_obj_todouble_safe"]
    #[doc = " @param obj CL object"]
    #[doc = " @return double value"]
    pub fn ucl_object_todouble(obj: *const ucl_object_t) -> f64;
}
extern "C" {
    #[doc = " Converts an object to integer value"]
    #[doc = " @param obj CL object"]
    #[doc = " @param target target integer variable"]
    #[doc = " @return true if conversion was successful"]
    pub fn ucl_object_toint_safe(obj: *const ucl_object_t, target: *mut i64) -> bool;
}
extern "C" {
    #[doc = " Unsafe version of \\ref ucl_obj_toint_safe"]
    #[doc = " @param obj CL object"]
    #[doc = " @return int value"]
    pub fn ucl_object_toint(obj: *const ucl_object_t) -> i64;
}
extern "C" {
    #[doc = " Converts an object to boolean value"]
    #[doc = " @param obj CL object"]
    #[doc = " @param target target boolean variable"]
    #[doc = " @return true if conversion was successful"]
    pub fn ucl_object_toboolean_safe(obj: *const ucl_object_t, target: *mut bool) -> bool;
}
extern "C" {
    #[doc = " Unsafe version of \\ref ucl_obj_toboolean_safe"]
    #[doc = " @param obj CL object"]
    #[doc = " @return boolean value"]
    pub fn ucl_object_toboolean(obj: *const ucl_object_t) -> bool;
}
extern "C" {
    #[doc = " Converts an object to string value"]
    #[doc = " @param obj CL object"]
    #[doc = " @param target target string variable, no need to free value"]
    #[doc = " @return true if conversion was successful"]
    pub fn ucl_object_tostring_safe(
        obj: *const ucl_object_t,
        target: *mut *const ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " Unsafe version of \\ref ucl_obj_tostring_safe"]
    #[doc = " @param obj CL object"]
    #[doc = " @return string value"]
    pub fn ucl_object_tostring(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Convert any object to a string in JSON notation if needed"]
    #[doc = " @param obj CL object"]
    #[doc = " @return string value"]
    pub fn ucl_object_tostring_forced(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Return string as char * and len, string may be not zero terminated, more efficient that \\ref ucl_obj_tostring as it"]
    #[doc = " allows zero-copy (if #UCL_PARSER_ZEROCOPY has been used during parsing)"]
    #[doc = " @param obj CL object"]
    #[doc = " @param target target string variable, no need to free value"]
    #[doc = " @param tlen target length"]
    #[doc = " @return true if conversion was successful"]
    pub fn ucl_object_tolstring_safe(
        obj: *const ucl_object_t,
        target: *mut *const ::std::os::raw::c_char,
        tlen: *mut usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Unsafe version of \\ref ucl_obj_tolstring_safe"]
    #[doc = " @param obj CL object"]
    #[doc = " @return string value"]
    pub fn ucl_object_tolstring(
        obj: *const ucl_object_t,
        tlen: *mut usize,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Return object identified by a key in the specified object"]
    #[doc = " @param obj object to get a key from (must be of type UCL_OBJECT)"]
    #[doc = " @param key key to search"]
    #[doc = " @return object matching the specified key or NULL if key was not found"]
    pub fn ucl_object_lookup(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Return object identified by a key in the specified object, if the first key is"]
    #[doc = " not found then look for the next one. This process is repeated unless"]
    #[doc = " the next argument in the list is not NULL. So, `ucl_object_find_any_key(obj, key, NULL)`"]
    #[doc = " is equal to `ucl_object_find_key(obj, key)`"]
    #[doc = " @param obj object to get a key from (must be of type UCL_OBJECT)"]
    #[doc = " @param key key to search"]
    #[doc = " @param ... list of alternative keys to search (NULL terminated)"]
    #[doc = " @return object matching the specified key or NULL if key was not found"]
    pub fn ucl_object_lookup_any(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
        ...
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Return object identified by a fixed size key in the specified object"]
    #[doc = " @param obj object to get a key from (must be of type UCL_OBJECT)"]
    #[doc = " @param key key to search"]
    #[doc = " @param klen length of a key"]
    #[doc = " @return object matching the specified key or NULL if key was not found"]
    pub fn ucl_object_lookup_len(
        obj: *const ucl_object_t,
        key: *const ::std::os::raw::c_char,
        klen: usize,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Return object identified by dot notation string"]
    #[doc = " @param obj object to search in"]
    #[doc = " @param path dot.notation.path to the path to lookup. May use numeric .index on arrays"]
    #[doc = " @return object matched the specified path or NULL if path is not found"]
    pub fn ucl_object_lookup_path(
        obj: *const ucl_object_t,
        path: *const ::std::os::raw::c_char,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Return object identified by object notation string using arbitrary delimiter"]
    #[doc = " @param obj object to search in"]
    #[doc = " @param path dot.notation.path to the path to lookup. May use numeric .index on arrays"]
    #[doc = " @param sep the sepatorator to use in place of . (incase keys have . in them)"]
    #[doc = " @return object matched the specified path or NULL if path is not found"]
    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;
}
extern "C" {
    #[doc = " Returns a key of an object as a NULL terminated string"]
    #[doc = " @param obj CL object"]
    #[doc = " @return key or NULL if there is no key"]
    pub fn ucl_object_key(obj: *const ucl_object_t) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Returns a key of an object as a fixed size string (may be more efficient)"]
    #[doc = " @param obj CL object"]
    #[doc = " @param len target key length"]
    #[doc = " @return key pointer"]
    pub fn ucl_object_keyl(
        obj: *const ucl_object_t,
        len: *mut usize,
    ) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Increase reference count for an object"]
    #[doc = " @param obj object to ref"]
    #[doc = " @return the referenced object"]
    pub fn ucl_object_ref(obj: *const ucl_object_t) -> *mut ucl_object_t;
}
extern "C" {
    pub fn ucl_object_free(obj: *mut ucl_object_t);
}
extern "C" {
    #[doc = " Decrease reference count for an object"]
    #[doc = " @param obj object to unref"]
    pub fn ucl_object_unref(obj: *mut ucl_object_t);
}
extern "C" {
    #[doc = " Compare objects `o1` and `o2`"]
    #[doc = " @param o1 the first object"]
    #[doc = " @param o2 the second object"]
    #[doc = " @return values >0, 0 and <0 if `o1` is more than, equal and less than `o2`."]
    #[doc = " The order of comparison:"]
    #[doc = " 1) Type of objects"]
    #[doc = " 2) Size of objects"]
    #[doc = " 3) Content of objects"]
    pub fn ucl_object_compare(
        o1: *const ucl_object_t,
        o2: *const ucl_object_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Compare objects `o1` and `o2` useful for sorting"]
    #[doc = " @param o1 the first object"]
    #[doc = " @param o2 the second object"]
    #[doc = " @return values >0, 0 and <0 if `o1` is more than, equal and less than `o2`."]
    #[doc = " The order of comparison:"]
    #[doc = " 1) Type of objects"]
    #[doc = " 2) Size of objects"]
    #[doc = " 3) Content of objects"]
    pub fn ucl_object_compare_qsort(
        o1: *mut *const ucl_object_t,
        o2: *mut *const ucl_object_t,
    ) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Sort UCL array using `cmp` compare function"]
    #[doc = " @param ar"]
    #[doc = " @param cmp"]
    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,
        >,
    );
}
extern "C" {
    #[doc = " Get the priority for specific UCL object"]
    #[doc = " @param obj any ucl object"]
    #[doc = " @return priority of an object"]
    pub fn ucl_object_get_priority(obj: *const ucl_object_t) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " Set explicit priority of an object."]
    #[doc = " @param obj any ucl object"]
    #[doc = " @param priority new priroity value (only 4 least significant bits are considred)"]
    pub fn ucl_object_set_priority(obj: *mut ucl_object_t, priority: ::std::os::raw::c_uint);
}
#[doc = " Opaque iterator object"]
pub type ucl_object_iter_t = *mut ::std::os::raw::c_void;
extern "C" {
    #[doc = " Get next key from an object"]
    #[doc = " @param obj object to iterate"]
    #[doc = " @param iter opaque iterator, must be set to NULL on the first call:"]
    #[doc = " ucl_object_iter_t it = NULL;"]
    #[doc = " while ((cur = ucl_iterate_object (obj, &it)) != NULL) ..."]
    #[doc = " @return the next object or NULL"]
    pub fn ucl_object_iterate(
        obj: *const ucl_object_t,
        iter: *mut ucl_object_iter_t,
        expand_values: bool,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Create new safe iterator for the specified object"]
    #[doc = " @param obj object to iterate"]
    #[doc = " @return new iterator object that should be used with safe iterators API only"]
    pub fn ucl_object_iterate_new(obj: *const ucl_object_t) -> ucl_object_iter_t;
}
extern "C" {
    #[doc = " Reset initialized iterator to a new object"]
    #[doc = " @param obj new object to iterate"]
    #[doc = " @return modified iterator object"]
    pub fn ucl_object_iterate_reset(
        it: ucl_object_iter_t,
        obj: *const ucl_object_t,
    ) -> ucl_object_iter_t;
}
extern "C" {
    #[doc = " Get the next object from the `obj`. This function iterates over arrays, objects"]
    #[doc = " and implicit arrays"]
    #[doc = " @param iter safe iterator"]
    #[doc = " @param expand_values expand explicit arrays and objects"]
    #[doc = " @return the next object in sequence"]
    pub fn ucl_object_iterate_safe(
        iter: ucl_object_iter_t,
        expand_values: bool,
    ) -> *const ucl_object_t;
}
#[repr(u32)]
#[doc = " Iteration type enumerator"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_iterate_type {
    #[doc = "< Iterate just explicit arrays and objects"]
    UCL_ITERATE_EXPLICIT = 1,
    #[doc = "< Iterate just implicit arrays"]
    UCL_ITERATE_IMPLICIT = 2,
    #[doc = "< Iterate both explicit and implicit arrays"]
    UCL_ITERATE_BOTH = 3,
}
extern "C" {
    #[doc = " Get the next object from the `obj`. This function iterates over arrays, objects"]
    #[doc = " and implicit arrays if needed"]
    #[doc = " @param iter safe iterator"]
    #[doc = " @param"]
    #[doc = " @return the next object in sequence"]
    pub fn ucl_object_iterate_full(
        iter: ucl_object_iter_t,
        type_: ucl_iterate_type,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Free memory associated with the safe iterator"]
    #[doc = " @param it safe iterator object"]
    pub fn ucl_object_iterate_free(it: ucl_object_iter_t);
}
#[doc = " Macro handler for a parser"]
#[doc = " @param data the content of macro"]
#[doc = " @param len the length of content"]
#[doc = " @param arguments arguments object"]
#[doc = " @param ud opaque user data"]
#[doc = " @param err error pointer"]
#[doc = " @return true if macro has been parsed"]
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,
>;
#[doc = " Context dependent macro handler for a parser"]
#[doc = " @param data the content of macro"]
#[doc = " @param len the length of content"]
#[doc = " @param arguments arguments object"]
#[doc = " @param context previously parsed context"]
#[doc = " @param ud opaque user data"]
#[doc = " @param err error pointer"]
#[doc = " @return true if macro has been parsed"]
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],
}
extern "C" {
    #[doc = " Creates new parser object"]
    #[doc = " @param pool pool to allocate memory from"]
    #[doc = " @return new parser object"]
    pub fn ucl_parser_new(flags: ::std::os::raw::c_int) -> *mut ucl_parser;
}
extern "C" {
    #[doc = " Sets the default priority for the parser applied to chunks that do not"]
    #[doc = " specify priority explicitly"]
    #[doc = " @param parser parser object"]
    #[doc = " @param prio default priority (0 .. 16)"]
    #[doc = " @return true if parser's default priority was set"]
    pub fn ucl_parser_set_default_priority(
        parser: *mut ucl_parser,
        prio: ::std::os::raw::c_uint,
    ) -> bool;
}
extern "C" {
    #[doc = " Gets the default priority for the parser applied to chunks that do not"]
    #[doc = " specify priority explicitly"]
    #[doc = " @param parser parser object"]
    #[doc = " @return true default priority (0 .. 16), -1 for failure"]
    pub fn ucl_parser_get_default_priority(parser: *mut ucl_parser) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Register new handler for a macro"]
    #[doc = " @param parser parser object"]
    #[doc = " @param macro macro name (without leading dot)"]
    #[doc = " @param handler handler (it is called immediately after macro is parsed)"]
    #[doc = " @param ud opaque user data for a handler"]
    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,
    );
}
extern "C" {
    #[doc = " Register new context dependent handler for a macro"]
    #[doc = " @param parser parser object"]
    #[doc = " @param macro macro name (without leading dot)"]
    #[doc = " @param handler handler (it is called immediately after macro is parsed)"]
    #[doc = " @param ud opaque user data for a handler"]
    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,
    );
}
#[doc = " Handler to detect unregistered variables"]
#[doc = " @param data variable data"]
#[doc = " @param len length of variable"]
#[doc = " @param replace (out) replace value for variable"]
#[doc = " @param replace_len (out) replace length for variable"]
#[doc = " @param need_free (out) UCL will free `dest` after usage"]
#[doc = " @param ud opaque userdata"]
#[doc = " @return true if variable"]
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,
>;
extern "C" {
    #[doc = " Register new parser variable"]
    #[doc = " @param parser parser object"]
    #[doc = " @param var variable name"]
    #[doc = " @param value variable value"]
    pub fn ucl_parser_register_variable(
        parser: *mut ucl_parser,
        var: *const ::std::os::raw::c_char,
        value: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " Set handler for unknown variables"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param handler desired handler"]
    #[doc = " @param ud opaque data for the handler"]
    pub fn ucl_parser_set_variables_handler(
        parser: *mut ucl_parser,
        handler: ucl_variable_handler,
        ud: *mut ::std::os::raw::c_void,
    );
}
extern "C" {
    #[doc = " Load new chunk to a parser"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the beginning of a chunk"]
    #[doc = " @param len the length of a chunk"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    pub fn ucl_parser_add_chunk(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Load new chunk to a parser with the specified priority"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the beginning of a chunk"]
    #[doc = " @param len the length of a chunk"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Insert new chunk to a parser (must have previously processed data with an existing top object)"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the beginning of a chunk"]
    #[doc = " @param len the length of a chunk"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    pub fn ucl_parser_insert_chunk(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Full version of ucl_add_chunk with priority and duplicate strategy"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the beginning of a chunk"]
    #[doc = " @param len the length of a chunk"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @param strat duplicates merging strategy"]
    #[doc = " @param parse_type input format"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Load ucl object from a string"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the string"]
    #[doc = " @param len the length of the string, if `len` is 0 then `data` must be zero-terminated string"]
    #[doc = " @return true if string has been added and false in case of error"]
    pub fn ucl_parser_add_string(
        parser: *mut ucl_parser,
        data: *const ::std::os::raw::c_char,
        len: usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Load ucl object from a string"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param data the pointer to the string"]
    #[doc = " @param len the length of the string, if `len` is 0 then `data` must be zero-terminated string"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @return true if string has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Load and add data from a file"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    pub fn ucl_parser_add_file(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
    ) -> bool;
}
extern "C" {
    #[doc = " Load and add data from a file"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Load and add data from a file"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @param strat Merge strategy to use while parsing this file"]
    #[doc = " @param parse_type Parser type to use while parsing this file"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Load and add data from a file descriptor"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    pub fn ucl_parser_add_fd(parser: *mut ucl_parser, fd: ::std::os::raw::c_int) -> bool;
}
extern "C" {
    #[doc = " Load and add data from a file descriptor"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    pub fn ucl_parser_add_fd_priority(
        parser: *mut ucl_parser,
        fd: ::std::os::raw::c_int,
        priority: ::std::os::raw::c_uint,
    ) -> bool;
}
extern "C" {
    #[doc = " Load and add data from a file descriptor"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param filename the name of file"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @param priority the desired priority of a chunk (only 4 least significant bits"]
    #[doc = " are considered for this parameter)"]
    #[doc = " @param strat Merge strategy to use while parsing this file"]
    #[doc = " @param parse_type Parser type to use while parsing this file"]
    #[doc = " @return true if chunk has been added and false in case of error"]
    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;
}
extern "C" {
    #[doc = " Provide a UCL_ARRAY of paths to search for include files. The object is"]
    #[doc = " copied so caller must unref the object."]
    #[doc = " @param parser parser structure"]
    #[doc = " @param paths UCL_ARRAY of paths to search"]
    #[doc = " @return true if the path search array was replaced in the parser"]
    pub fn ucl_set_include_path(parser: *mut ucl_parser, paths: *mut ucl_object_t) -> bool;
}
extern "C" {
    #[doc = " Get a top object for a parser (refcount is increased)"]
    #[doc = " @param parser parser structure"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @return top parser object or NULL"]
    pub fn ucl_parser_get_object(parser: *mut ucl_parser) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Get the current stack object as stack accessor function for use in macro"]
    #[doc = " functions (refcount is increased)"]
    #[doc = " @param parser parser object"]
    #[doc = " @param depth depth of stack to retrieve (top is 0)"]
    #[doc = " @return current stack object or NULL"]
    pub fn ucl_parser_get_current_stack_object(
        parser: *mut ucl_parser,
        depth: ::std::os::raw::c_uint,
    ) -> *mut ucl_object_t;
}
extern "C" {
    #[doc = " Peek at the character at the current chunk position"]
    #[doc = " @param parser parser structure"]
    #[doc = " @return current chunk position character"]
    pub fn ucl_parser_chunk_peek(parser: *mut ucl_parser) -> ::std::os::raw::c_uchar;
}
extern "C" {
    #[doc = " Skip the character at the current chunk position"]
    #[doc = " @param parser parser structure"]
    #[doc = " @return success boolean"]
    pub fn ucl_parser_chunk_skip(parser: *mut ucl_parser) -> bool;
}
extern "C" {
    #[doc = " Get the error string if parsing has been failed"]
    #[doc = " @param parser parser object"]
    #[doc = " @return error description"]
    pub fn ucl_parser_get_error(parser: *mut ucl_parser) -> *const ::std::os::raw::c_char;
}
extern "C" {
    #[doc = " Get the code of the last error"]
    #[doc = " @param parser parser object"]
    #[doc = " @return error code"]
    pub fn ucl_parser_get_error_code(parser: *mut ucl_parser) -> ::std::os::raw::c_int;
}
extern "C" {
    #[doc = " Get the current column number within parser"]
    #[doc = " @param parser parser object"]
    #[doc = " @return current column number"]
    pub fn ucl_parser_get_column(parser: *mut ucl_parser) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " Get the current line number within parser"]
    #[doc = " @param parser parser object"]
    #[doc = " @return current line number"]
    pub fn ucl_parser_get_linenum(parser: *mut ucl_parser) -> ::std::os::raw::c_uint;
}
extern "C" {
    #[doc = " Clear the error in the parser"]
    #[doc = " @param parser parser object"]
    pub fn ucl_parser_clear_error(parser: *mut ucl_parser);
}
extern "C" {
    #[doc = " Free ucl parser object"]
    #[doc = " @param parser parser object"]
    pub fn ucl_parser_free(parser: *mut ucl_parser);
}
extern "C" {
    #[doc = " Get constant opaque pointer to comments structure for this parser. Increase"]
    #[doc = " refcount to prevent this object to be destroyed on parser's destruction"]
    #[doc = " @param parser parser structure"]
    #[doc = " @return ucl comments pointer or NULL"]
    pub fn ucl_parser_get_comments(parser: *mut ucl_parser) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Utility function to find a comment object for the specified object in the input"]
    #[doc = " @param comments comments object"]
    #[doc = " @param srch search object"]
    #[doc = " @return string comment enclosed in ucl_object_t"]
    pub fn ucl_comments_find(
        comments: *const ucl_object_t,
        srch: *const ucl_object_t,
    ) -> *const ucl_object_t;
}
extern "C" {
    #[doc = " Move comment from `from` object to `to` object"]
    #[doc = " @param comments comments object"]
    #[doc = " @param what source object"]
    #[doc = " @param with destination object"]
    #[doc = " @return `true` if `from` has comment and it has been moved to `to`"]
    pub fn ucl_comments_move(
        comments: *mut ucl_object_t,
        from: *const ucl_object_t,
        to: *const ucl_object_t,
    ) -> bool;
}
extern "C" {
    #[doc = " Adds a new comment for an object"]
    #[doc = " @param comments comments object"]
    #[doc = " @param obj object to add comment to"]
    #[doc = " @param comment string representation of a comment"]
    pub fn ucl_comments_add(
        comments: *mut ucl_object_t,
        obj: *const ucl_object_t,
        comment: *const ::std::os::raw::c_char,
    );
}
extern "C" {
    #[doc = " Add new public key to parser for signatures check"]
    #[doc = " @param parser parser object"]
    #[doc = " @param key PEM representation of a key"]
    #[doc = " @param len length of the key"]
    #[doc = " @param err if *err is NULL it is set to parser error"]
    #[doc = " @return true if a key has been successfully added"]
    pub fn ucl_parser_pubkey_add(
        parser: *mut ucl_parser,
        key: *const ::std::os::raw::c_uchar,
        len: usize,
    ) -> bool;
}
extern "C" {
    #[doc = " Set FILENAME and CURDIR variables in parser"]
    #[doc = " @param parser parser object"]
    #[doc = " @param filename filename to set or NULL to set FILENAME to \"undef\" and CURDIR to getcwd()"]
    #[doc = " @param need_expand perform realpath() if this variable is true and filename is not NULL"]
    #[doc = " @return true if variables has been set"]
    pub fn ucl_parser_set_filevars(
        parser: *mut ucl_parser,
        filename: *const ::std::os::raw::c_char,
        need_expand: bool,
    ) -> bool;
}
#[doc = " Structure using for emitter callbacks"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_functions {
    #[doc = " Append a single character"]
    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,
    >,
    #[doc = " Append a string of a specified length"]
    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,
    >,
    #[doc = " Append a 64 bit integer"]
    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,
    >,
    #[doc = " Append floating point element"]
    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,
    >,
    #[doc = " Free userdata"]
    pub ucl_emitter_free_func:
        ::std::option::Option<unsafe extern "C" fn(ud: *mut ::std::os::raw::c_void)>,
    #[doc = " Opaque userdata pointer"]
    pub ud: *mut ::std::os::raw::c_void,
}
#[test]
fn bindgen_test_layout_ucl_emitter_functions() {
    assert_eq!(
        ::std::mem::size_of::<ucl_emitter_functions>(),
        48usize,
        concat!("Size of: ", stringify!(ucl_emitter_functions))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_emitter_functions>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_emitter_functions))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_functions>())).ucl_emitter_append_character
                as *const _ as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ucl_emitter_append_character)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_functions>())).ucl_emitter_append_len as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ucl_emitter_append_len)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_functions>())).ucl_emitter_append_int as *const _
                as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ucl_emitter_append_int)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_functions>())).ucl_emitter_append_double as *const _
                as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ucl_emitter_append_double)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_functions>())).ucl_emitter_free_func as *const _
                as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ucl_emitter_free_func)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_functions>())).ud as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_functions),
            "::",
            stringify!(ud)
        )
    );
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_operations {
    #[doc = " Write a primitive element"]
    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,
        ),
    >,
    #[doc = " Start ucl object"]
    pub ucl_emitter_start_object: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ucl_emitter_context,
            obj: *const ucl_object_t,
            print_key: bool,
        ),
    >,
    #[doc = " End ucl object"]
    pub ucl_emitter_end_object: ::std::option::Option<
        unsafe extern "C" fn(ctx: *mut ucl_emitter_context, obj: *const ucl_object_t),
    >,
    #[doc = " Start ucl array"]
    pub ucl_emitter_start_array: ::std::option::Option<
        unsafe extern "C" fn(
            ctx: *mut ucl_emitter_context,
            obj: *const ucl_object_t,
            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),
    >,
}
#[test]
fn bindgen_test_layout_ucl_emitter_operations() {
    assert_eq!(
        ::std::mem::size_of::<ucl_emitter_operations>(),
        40usize,
        concat!("Size of: ", stringify!(ucl_emitter_operations))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_emitter_operations>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_emitter_operations))
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_operations>())).ucl_emitter_write_elt as *const _
                as usize
        },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_operations),
            "::",
            stringify!(ucl_emitter_write_elt)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_operations>())).ucl_emitter_start_object as *const _
                as usize
        },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_operations),
            "::",
            stringify!(ucl_emitter_start_object)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_operations>())).ucl_emitter_end_object as *const _
                as usize
        },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_operations),
            "::",
            stringify!(ucl_emitter_end_object)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_operations>())).ucl_emitter_start_array as *const _
                as usize
        },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_operations),
            "::",
            stringify!(ucl_emitter_start_array)
        )
    );
    assert_eq!(
        unsafe {
            &(*(::std::ptr::null::<ucl_emitter_operations>())).ucl_emitter_end_array as *const _
                as usize
        },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_operations),
            "::",
            stringify!(ucl_emitter_end_array)
        )
    );
}
#[doc = " @defgroup emitter Emitting functions"]
#[doc = " These functions are used to serialise UCL objects to some string representation."]
#[doc = ""]
#[doc = " @{"]
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct ucl_emitter_context {
    #[doc = " Name of emitter (e.g. json, compact_json)"]
    pub name: *const ::std::os::raw::c_char,
    #[doc = " Unique id (e.g. UCL_EMIT_JSON for standard emitters"]
    pub id: ::std::os::raw::c_int,
    #[doc = " A set of output functions"]
    pub func: *const ucl_emitter_functions,
    #[doc = " A set of output operations"]
    pub ops: *const ucl_emitter_operations,
    #[doc = " Current amount of indent tabs"]
    pub indent: ::std::os::raw::c_uint,
    #[doc = " Top level object"]
    pub top: *const ucl_object_t,
    #[doc = " Optional comments"]
    pub comments: *const ucl_object_t,
}
#[test]
fn bindgen_test_layout_ucl_emitter_context() {
    assert_eq!(
        ::std::mem::size_of::<ucl_emitter_context>(),
        56usize,
        concat!("Size of: ", stringify!(ucl_emitter_context))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_emitter_context>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_emitter_context))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).name as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(name)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).id as *const _ as usize },
        8usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(id)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).func as *const _ as usize },
        16usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(func)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).ops as *const _ as usize },
        24usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(ops)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).indent as *const _ as usize },
        32usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(indent)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).top as *const _ as usize },
        40usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(top)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_emitter_context>())).comments as *const _ as usize },
        48usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_emitter_context),
            "::",
            stringify!(comments)
        )
    );
}
extern "C" {
    #[doc = " Emit object to a string"]
    #[doc = " @param obj object"]
    #[doc = " @param emit_type if type is #UCL_EMIT_JSON then emit json, if type is"]
    #[doc = " #UCL_EMIT_CONFIG then emit config like object"]
    #[doc = " @return dump of an object (must be freed after using) or NULL in case of error"]
    pub fn ucl_object_emit(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
    ) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
    #[doc = " Emit object to a string that can contain `\\0` inside"]
    #[doc = " @param obj object"]
    #[doc = " @param emit_type if type is #UCL_EMIT_JSON then emit json, if type is"]
    #[doc = " #UCL_EMIT_CONFIG then emit config like object"]
    #[doc = " @param len the resulting length"]
    #[doc = " @return dump of an object (must be freed after using) or NULL in case of error"]
    pub fn ucl_object_emit_len(
        obj: *const ucl_object_t,
        emit_type: ucl_emitter,
        len: *mut usize,
    ) -> *mut ::std::os::raw::c_uchar;
}
extern "C" {
    #[doc = " Emit object to a string"]
    #[doc = " @param obj object"]
    #[doc = " @param emit_type if type is #UCL_EMIT_JSON then emit json, if type is"]
    #[doc = " #UCL_EMIT_CONFIG then emit config like object"]
    #[doc = " @param emitter a set of emitter functions"]
    #[doc = " @param comments optional comments for the parser"]
    #[doc = " @return dump of an object (must be freed after using) or NULL in case of error"]
    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;
}
extern "C" {
    #[doc = " Start streamlined UCL object emitter"]
    #[doc = " @param obj top UCL object"]
    #[doc = " @param emit_type emit type"]
    #[doc = " @param emitter a set of emitter functions"]
    #[doc = " @return new streamlined context that should be freed by"]
    #[doc = " `ucl_object_emit_streamline_finish`"]
    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;
}
extern "C" {
    #[doc = " Start object or array container for the streamlined output"]
    #[doc = " @param ctx streamlined context"]
    #[doc = " @param obj container object"]
    pub fn ucl_object_emit_streamline_start_container(
        ctx: *mut ucl_emitter_context,
        obj: *const ucl_object_t,
    );
}
extern "C" {
    #[doc = " Add a complete UCL object to streamlined output"]
    #[doc = " @param ctx streamlined context"]
    #[doc = " @param obj object to output"]
    pub fn ucl_object_emit_streamline_add_object(
        ctx: *mut ucl_emitter_context,
        obj: *const ucl_object_t,
    );
}
extern "C" {
    #[doc = " End previously added container"]
    #[doc = " @param ctx streamlined context"]
    pub fn ucl_object_emit_streamline_end_container(ctx: *mut ucl_emitter_context);
}
extern "C" {
    #[doc = " Terminate streamlined container finishing all containers in it"]
    #[doc = " @param ctx streamlined context"]
    pub fn ucl_object_emit_streamline_finish(ctx: *mut ucl_emitter_context);
}
extern "C" {
    #[doc = " Returns functions to emit object to memory"]
    #[doc = " @param pmem target pointer (should be freed by caller)"]
    #[doc = " @return emitter functions structure"]
    pub fn ucl_object_emit_memory_funcs(
        pmem: *mut *mut ::std::os::raw::c_void,
    ) -> *mut ucl_emitter_functions;
}
extern "C" {
    #[doc = " Returns functions to emit object to a file descriptor"]
    #[doc = " @param fd file descriptor"]
    #[doc = " @return emitter functions structure"]
    pub fn ucl_object_emit_fd_funcs(fd: ::std::os::raw::c_int) -> *mut ucl_emitter_functions;
}
extern "C" {
    #[doc = " Free emitter functions"]
    #[doc = " @param f pointer to functions"]
    pub fn ucl_object_emit_funcs_free(f: *mut ucl_emitter_functions);
}
#[repr(u32)]
#[doc = " Used to define UCL schema error"]
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub enum ucl_schema_error_code {
    #[doc = "< no error"]
    UCL_SCHEMA_OK = 0,
    #[doc = "< type of object is incorrect"]
    UCL_SCHEMA_TYPE_MISMATCH = 1,
    #[doc = "< schema is invalid"]
    UCL_SCHEMA_INVALID_SCHEMA = 2,
    #[doc = "< one or more missing properties"]
    UCL_SCHEMA_MISSING_PROPERTY = 3,
    #[doc = "< constraint found"]
    UCL_SCHEMA_CONSTRAINT = 4,
    #[doc = "< missing dependency"]
    UCL_SCHEMA_MISSING_DEPENDENCY = 5,
    #[doc = "< cannot fetch external ref"]
    UCL_SCHEMA_EXTERNAL_REF_MISSING = 6,
    #[doc = "< invalid external ref"]
    UCL_SCHEMA_EXTERNAL_REF_INVALID = 7,
    #[doc = "< something bad happened"]
    UCL_SCHEMA_INTERNAL_ERROR = 8,
    #[doc = "< generic error"]
    UCL_SCHEMA_UNKNOWN = 9,
}
#[doc = " Generic ucl schema error"]
#[repr(C)]
#[derive(Copy, Clone)]
pub struct ucl_schema_error {
    #[doc = "< error code"]
    pub code: ucl_schema_error_code,
    #[doc = "< error message"]
    pub msg: [::std::os::raw::c_char; 128usize],
    #[doc = "< object where error occurred"]
    pub obj: *const ucl_object_t,
}
#[test]
fn bindgen_test_layout_ucl_schema_error() {
    assert_eq!(
        ::std::mem::size_of::<ucl_schema_error>(),
        144usize,
        concat!("Size of: ", stringify!(ucl_schema_error))
    );
    assert_eq!(
        ::std::mem::align_of::<ucl_schema_error>(),
        8usize,
        concat!("Alignment of ", stringify!(ucl_schema_error))
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_schema_error>())).code as *const _ as usize },
        0usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_schema_error),
            "::",
            stringify!(code)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_schema_error>())).msg as *const _ as usize },
        4usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_schema_error),
            "::",
            stringify!(msg)
        )
    );
    assert_eq!(
        unsafe { &(*(::std::ptr::null::<ucl_schema_error>())).obj as *const _ as usize },
        136usize,
        concat!(
            "Offset of field: ",
            stringify!(ucl_schema_error),
            "::",
            stringify!(obj)
        )
    );
}
extern "C" {
    #[doc = " Validate object `obj` using schema object `schema`."]
    #[doc = " @param schema schema object"]
    #[doc = " @param obj object to validate"]
    #[doc = " @param err error pointer, if this parameter is not NULL and error has been"]
    #[doc = " occurred, then `err` is filled with the exact error definition."]
    #[doc = " @return true if `obj` is valid using `schema`"]
    pub fn ucl_object_validate(
        schema: *const ucl_object_t,
        obj: *const ucl_object_t,
        err: *mut ucl_schema_error,
    ) -> bool;
}
extern "C" {
    #[doc = " Validate object `obj` using schema object `schema` and root schema at `root`."]
    #[doc = " @param schema schema object"]
    #[doc = " @param obj object to validate"]
    #[doc = " @param root root schema object"]
    #[doc = " @param err error pointer, if this parameter is not NULL and error has been"]
    #[doc = " occurred, then `err` is filled with the exact error definition."]
    #[doc = " @return true if `obj` is valid using `schema`"]
    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;
}
extern "C" {
    #[doc = " Validate object `obj` using schema object `schema` and root schema at `root`"]
    #[doc = " using some external references provided."]
    #[doc = " @param schema schema object"]
    #[doc = " @param obj object to validate"]
    #[doc = " @param root root schema object"]
    #[doc = " @param ext_refs external references (might be modified during validation)"]
    #[doc = " @param err error pointer, if this parameter is not NULL and error has been"]
    #[doc = " occurred, then `err` is filled with the exact error definition."]
    #[doc = " @return true if `obj` is valid using `schema`"]
    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;
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pthread_mutex {
    pub _address: u8,
}
#[repr(C)]
#[derive(Debug, Copy, Clone)]
pub struct pthread {
    pub _address: u8,
}