diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3384970..8b7abe5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - icu_version: [63, 73, 74] + icu_version: [74, 76, 77] steps: - uses: actions/checkout@v2 - name: 'Test ICU version ${{ matrix.icu_version }}' @@ -24,7 +24,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - icu_version: [72, 73, 74] + icu_version: [74, 76, 77] feature_set: - "renaming,icu_version_in_env,icu_version_64_plus,icu_version_67_plus,icu_version_68_plus" - "renaming,icu_version_64_plus,icu_version_67_plus,icu_version_68_plus,icu_config,use-bindgen" @@ -32,17 +32,6 @@ jobs: - uses: actions/checkout@v2 - name: 'Test ICU version ${{ matrix.icu_version }}' run: 'make DOCKER_TEST_ENV=rust_icu_testenv-${{ matrix.icu_version }} RUST_ICU_MAJOR_VERSION_NUMBER=${{ matrix.icu_version }} DOCKER_TEST_CARGO_TEST_ARGS="--no-default-features --features ${{ matrix.feature_set }}" docker-test' - test-nondefault-features: - runs-on: ubuntu-latest - strategy: - matrix: - icu_version: [63] - feature_set: - - "renaming,icu_version_in_env,icu_version_69_max" - steps: - - uses: actions/checkout@v2 - - name: 'Test ICU version ${{ matrix.icu_version }}' - run: 'make DOCKER_TEST_ENV=rust_icu_testenv-${{ matrix.icu_version }} RUST_ICU_MAJOR_VERSION_NUMBER=${{ matrix.icu_version }} DOCKER_TEST_CARGO_TEST_ARGS="--no-default-features --features ${{ matrix.feature_set }}" docker-test' test-bindgen: runs-on: ubuntu-latest steps: @@ -66,7 +55,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - icu_version: [74] + icu_version: [77] steps: - uses: actions/checkout@v2 - name: 'Test ICU `main`' diff --git a/Makefile b/Makefile index 06b55cb..8852c33 100644 --- a/Makefile +++ b/Makefile @@ -55,7 +55,7 @@ CARGO_TARGET_DIR := ${TMP}/rust_icu-${LOGNAME}-target # Pass different values for DOCKER_TEST_ENV and DOCKER_TEST_CARGO_TEST_ARGS to # test different configurations. This is useful in Travis CI matrix tests, for # example. -RUST_ICU_MAJOR_VERSION_NUMBER ?= 74 +RUST_ICU_MAJOR_VERSION_NUMBER ?= 77 DOCKER_TEST_ENV ?= rust_icu_testenv-${RUST_ICU_MAJOR_VERSION_NUMBER} DOCKER_TEST_CARGO_TEST_ARGS ?= docker-test: @@ -123,7 +123,9 @@ static-bindgen: \ static-bindgen-71.stamp \ static-bindgen-72.stamp \ static-bindgen-73.stamp \ - static-bindgen-74.stamp + static-bindgen-74.stamp \ + static-bindgen-76.stamp \ + static-bindgen-77.stamp .PHONY: static-bindgen @@ -149,7 +151,9 @@ static-bindgen-special-%.stamp: rust_icu_sys/bindgen_special/run_bindgen.sh static-bindgen-special: \ static-bindgen-special-72.stamp \ static-bindgen-special-73.stamp \ - static-bindgen-special-74.stamp + static-bindgen-special-74.stamp \ + static-bindgen-special-76.stamp \ + static-bindgen-special-77.stamp .PHONY: static-bindgen-special # Builds and pushes the build environment containers. You would not normally diff --git a/README.md b/README.md index 674ae75..f2d39fb 100644 --- a/README.md +++ b/README.md @@ -114,17 +114,12 @@ The limitations we know of today are as follows: # Compatibility -The compatibility guarantee is as follows: +Automated tests are executed for last three major ICU library versions in all +feature combinations of interest. -1. Automated tests are executed for last three major ICU library versions in all - feature combinations of interest. -2. Automated tests are executed for the ICU library version in use by the docs.rs - system (so the documentation could be built). - -`rust_icu` version | ICU 63.x | ICU 73.1 | ICU 74.1 | ICU 75.0 | ICU 76.0 | ICU 77.0 | --------------------- | -------- | -------- | -------- | -------- | -------- | -------- | -4.0 | ✅ | ✅ | | | | | -5.x | ✅ | ✅ | ✅ | | ✅ | ✅ | +`rust_icu` version | ICU 74.1 | ICU 75.0 | ICU 76.0 | ICU 77.0 | +-------------------- | -------- | -------- | -------- | -------- | +5.4.x | ✅ | | ✅ | ✅ | # Features diff --git a/rust_icu_sys/bindgen/lib_63.rs b/rust_icu_sys/bindgen/lib_63.rs index 3007f05..78f8ff8 100644 --- a/rust_icu_sys/bindgen/lib_63.rs +++ b/rust_icu_sys/bindgen/lib_63.rs @@ -1,23 +1,26 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type UBool = i8; pub type UChar = u16; pub type UChar32 = i32; pub type UVersionInfo = [u8; 4usize]; -extern "C" { +unsafe extern "C" { pub fn u_versionFromString_63( versionArray: *mut u8, versionString: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn u_versionFromUString_63(versionArray: *mut u8, versionString: *const UChar); } -extern "C" { - pub fn u_versionToString_63(versionArray: *mut u8, versionString: *mut ::std::os::raw::c_char); +unsafe extern "C" { + pub fn u_versionToString_63( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); } -extern "C" { +unsafe extern "C" { pub fn u_getVersion_63(versionArray: *mut u8); } pub type UDate = f64; @@ -211,7 +214,7 @@ pub enum UErrorCode { U_PLUGIN_DIDNT_SET_LEVEL = 66817, U_PLUGIN_ERROR_LIMIT = 66818, } -extern "C" { +unsafe extern "C" { pub fn u_errorName_63(code: UErrorCode) -> *const ::std::os::raw::c_char; } #[repr(C)] @@ -219,37 +222,37 @@ extern "C" { pub struct UEnumeration { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uenum_close_63(en: *mut UEnumeration); } -extern "C" { +unsafe extern "C" { pub fn uenum_count_63(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uenum_unext_63( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn uenum_next_63( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uenum_reset_63(en: *mut UEnumeration, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uenum_openUCharStringsEnumeration_63( strings: *const *const UChar, count: i32, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uenum_openCharStringsEnumeration_63( strings: *const *const ::std::os::raw::c_char, count: i32, @@ -264,13 +267,13 @@ pub enum ULocDataLocaleType { ULOC_REQUESTED_LOCALE = 2, ULOC_DATA_LOCALE_TYPE_LIMIT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_getDefault_63() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_setDefault_63(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uloc_getLanguage_63( localeID: *const ::std::os::raw::c_char, language: *mut ::std::os::raw::c_char, @@ -278,7 +281,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getScript_63( localeID: *const ::std::os::raw::c_char, script: *mut ::std::os::raw::c_char, @@ -286,7 +289,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getCountry_63( localeID: *const ::std::os::raw::c_char, country: *mut ::std::os::raw::c_char, @@ -294,7 +297,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getVariant_63( localeID: *const ::std::os::raw::c_char, variant: *mut ::std::os::raw::c_char, @@ -302,7 +305,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getName_63( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -310,7 +313,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_canonicalize_63( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -318,20 +321,20 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Language_63( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Country_63( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLCID_63(localeID: *const ::std::os::raw::c_char) -> u32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayLanguage_63( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -340,7 +343,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayScript_63( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -349,7 +352,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayCountry_63( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -358,7 +361,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayVariant_63( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -367,7 +370,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeyword_63( keyword: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -376,7 +379,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeywordValue_63( locale: *const ::std::os::raw::c_char, keyword: *const ::std::os::raw::c_char, @@ -386,7 +389,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayName_63( localeID: *const ::std::os::raw::c_char, inLocaleID: *const ::std::os::raw::c_char, @@ -395,19 +398,19 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getAvailable_63(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOLanguages_63() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOCountries_63() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getParent_63( localeID: *const ::std::os::raw::c_char, parent: *mut ::std::os::raw::c_char, @@ -415,7 +418,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getBaseName_63( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -423,13 +426,13 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_openKeywords_63( localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getKeywordValue_63( localeID: *const ::std::os::raw::c_char, keywordName: *const ::std::os::raw::c_char, @@ -438,7 +441,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_setKeywordValue_63( keywordName: *const ::std::os::raw::c_char, keywordValue: *const ::std::os::raw::c_char, @@ -447,7 +450,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_isRightToLeft_63(locale: *const ::std::os::raw::c_char) -> UBool; } #[repr(u32)] @@ -459,13 +462,13 @@ pub enum ULayoutType { ULOC_LAYOUT_BTT = 3, ULOC_LAYOUT_UNKNOWN = 4, } -extern "C" { +unsafe extern "C" { pub fn uloc_getCharacterOrientation_63( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> ULayoutType; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLineOrientation_63( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, @@ -478,7 +481,7 @@ pub enum UAcceptResult { ULOC_ACCEPT_VALID = 1, ULOC_ACCEPT_FALLBACK = 2, } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguageFromHTTP_63( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -488,7 +491,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguage_63( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -499,7 +502,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLocaleForLCID_63( hostID: u32, locale: *mut ::std::os::raw::c_char, @@ -507,7 +510,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_addLikelySubtags_63( localeID: *const ::std::os::raw::c_char, maximizedLocaleID: *mut ::std::os::raw::c_char, @@ -515,7 +518,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_minimizeSubtags_63( localeID: *const ::std::os::raw::c_char, minimizedLocaleID: *mut ::std::os::raw::c_char, @@ -523,7 +526,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_forLanguageTag_63( langtag: *const ::std::os::raw::c_char, localeID: *mut ::std::os::raw::c_char, @@ -532,7 +535,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLanguageTag_63( localeID: *const ::std::os::raw::c_char, langtag: *mut ::std::os::raw::c_char, @@ -541,23 +544,23 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleKey_63( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleType_63( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyKey_63( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyType_63( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, @@ -575,13 +578,13 @@ pub enum UCPMapRangeOption { UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, } -extern "C" { +unsafe extern "C" { pub fn ucpmap_get_63(map: *const UCPMap, c: UChar32) -> u32; } pub type UCPMapValueFilter = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, >; -extern "C" { +unsafe extern "C" { pub fn ucpmap_getRange_63( map: *const UCPMap, start: UChar32, @@ -815,112 +818,112 @@ pub enum UPropertyNameChoice { U_LONG_PROPERTY_NAME = 1, U_PROPERTY_NAME_CHOICE_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn u_hasBinaryProperty_63(c: UChar32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getBinaryPropertySet_63( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const USet; } -extern "C" { +unsafe extern "C" { pub fn u_isUAlphabetic_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isULowercase_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUUppercase_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUWhiteSpace_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyValue_63(c: UChar32, which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMinValue_63(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMaxValue_63(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMap_63( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const UCPMap; } -extern "C" { +unsafe extern "C" { pub fn u_getNumericValue_63(c: UChar32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn u_islower_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isupper_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_istitle_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdigit_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalpha_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalnum_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isxdigit_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_ispunct_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isgraph_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isblank_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdefined_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isspace_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaSpaceChar_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isWhitespace_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_iscntrl_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isISOControl_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isprint_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isbase_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charDirection_63(c: UChar32) -> UCharDirection; } -extern "C" { +unsafe extern "C" { pub fn u_isMirrored_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charMirror_63(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_getBidiPairedBracket_63(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charType_63(c: UChar32) -> i8; } pub type UCharEnumTypeRange = ::std::option::Option< @@ -931,19 +934,19 @@ pub type UCharEnumTypeRange = ::std::option::Option< type_: UCharCategory, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharTypes_63( enumRange: UCharEnumTypeRange, context: *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn u_getCombiningClass_63(c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn u_charDigitValue_63(c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charName_63( code: UChar32, nameChoice: UCharNameChoice, @@ -952,7 +955,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getISOComment_63( c: UChar32, dest: *mut ::std::os::raw::c_char, @@ -960,7 +963,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charFromName_63( nameChoice: UCharNameChoice, name: *const ::std::os::raw::c_char, @@ -976,7 +979,7 @@ pub type UEnumCharNamesFn = ::std::option::Option< length: i32, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharNames_63( start: UChar32, limit: UChar32, @@ -986,68 +989,68 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyName_63( property: UProperty, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyEnum_63(alias: *const ::std::os::raw::c_char) -> UProperty; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueName_63( property: UProperty, value: i32, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueEnum_63( property: UProperty, alias: *const ::std::os::raw::c_char, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_isIDStart_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDPart_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDIgnorable_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDStart_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDPart_63(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_tolower_63(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_toupper_63(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_totitle_63(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_foldCase_63(c: UChar32, options: u32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_digit_63(ch: UChar32, radix: i8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_forDigit_63(digit: i32, radix: i8) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charAge_63(c: UChar32, versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getUnicodeVersion_63(versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getFC_NFKC_Closure_63( c: UChar32, dest: *mut UChar, @@ -1055,10 +1058,10 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_close_63(ut: *mut UText) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUTF8_63( ut: *mut UText, s: *const ::std::os::raw::c_char, @@ -1066,7 +1069,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUChars_63( ut: *mut UText, s: *const UChar, @@ -1074,7 +1077,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_clone_63( dest: *mut UText, src: *const UText, @@ -1083,46 +1086,46 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_equals_63(a: *const UText, b: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_nativeLength_63(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_isLengthExpensive_63(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_char32At_63(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_current32_63(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32_63(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32_63(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32From_63(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32From_63(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_getNativeIndex_63(ut: *const UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_setNativeIndex_63(ut: *mut UText, nativeIndex: i64); } -extern "C" { +unsafe extern "C" { pub fn utext_moveIndex32_63(ut: *mut UText, delta: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_getPreviousNativeIndex_63(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_extract_63( ut: *mut UText, nativeStart: i64, @@ -1132,13 +1135,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_isWritable_63(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_hasMetaData_63(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_replace_63( ut: *mut UText, nativeStart: i64, @@ -1148,7 +1151,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_copy_63( ut: *mut UText, nativeStart: i64, @@ -1158,7 +1161,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utext_freeze_63(ut: *mut UText); } pub type UTextClone = ::std::option::Option< @@ -1228,181 +1231,34 @@ pub struct UTextFuncs { pub spare2: UTextClose, pub spare3: UTextClose, } -#[test] -fn bindgen_test_layout_UTextFuncs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UTextFuncs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UTextFuncs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(tableSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(clone) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(nativeLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(access) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(copy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapOffsetToNative) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapOffsetToNative) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapNativeIndexToUTF16) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapNativeIndexToUTF16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare3) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare3) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] pub struct UText { @@ -1431,231 +1287,40 @@ pub struct UText { pub privB: i32, pub privC: i32, } -#[test] -fn bindgen_test_layout_UText() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(UText)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UText)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).providerProperties) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(providerProperties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeOfStruct) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(sizeOfStruct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(extraSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeIndexingLimit) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(nativeIndexingLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeStart) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkContents) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkContents) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFuncs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pFuncs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pExtra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(p)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(q)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(r)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privP) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(a)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(b)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, - 124usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(c)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privA) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privB) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privC) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privC) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; impl Default for UText { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1665,7 +1330,7 @@ impl Default for UText { } } } -extern "C" { +unsafe extern "C" { pub fn utext_setup_63(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; } #[repr(C)] @@ -1681,61 +1346,17 @@ pub struct UParseError { pub preContext: [UChar; 16usize], pub postContext: [UChar; 16usize], } -#[test] -fn bindgen_test_layout_UParseError() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(UParseError)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UParseError)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(preContext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).postContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(postContext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UBreakIteratorType { @@ -1788,7 +1409,7 @@ pub enum USentenceBreakTag { UBRK_SENTENCE_TERM_LIMIT = 100, UBRK_SENTENCE_SEP_LIMIT = 200, } -extern "C" { +unsafe extern "C" { pub fn ubrk_open_63( type_: UBreakIteratorType, locale: *const ::std::os::raw::c_char, @@ -1797,7 +1418,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openRules_63( rules: *const UChar, rulesLength: i32, @@ -1807,7 +1428,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openBinaryRules_63( binaryRules: *const u8, rulesLength: i32, @@ -1816,7 +1437,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_safeClone_63( bi: *const UBreakIterator, stackBuffer: *mut ::std::os::raw::c_void, @@ -1824,10 +1445,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_close_63(bi: *mut UBreakIterator); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setText_63( bi: *mut UBreakIterator, text: *const UChar, @@ -1835,43 +1456,43 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setUText_63(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_current_63(bi: *const UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_next_63(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_previous_63(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_first_63(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_last_63(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_preceding_63(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_following_63(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getAvailable_63(index: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_isBoundary_63(bi: *mut UBreakIterator, offset: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatus_63(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatusVec_63( bi: *mut UBreakIterator, fillInVec: *mut i32, @@ -1879,17 +1500,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getLocaleByType_63( bi: *const UBreakIterator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_refreshUText_63(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_getBinaryRules_63( bi: *mut UBreakIterator, binaryRules: *mut u8, @@ -1979,7 +1600,7 @@ pub enum USystemTimeZoneType { UCAL_ZONE_TYPE_CANONICAL = 1, UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZoneIDEnumeration_63( zoneType: USystemTimeZoneType, region: *const ::std::os::raw::c_char, @@ -1987,32 +1608,32 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZones_63(ec: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openCountryTimeZones_63( country: *const ::std::os::raw::c_char, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDefaultTimeZone_63( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setDefaultTimeZone_63(zoneID: *const UChar, ec: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_getDSTSavings_63(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getNow_63() -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_open_63( zoneID: *const UChar, len: i32, @@ -2021,13 +1642,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_close_63(cal: *mut UCalendar); } -extern "C" { +unsafe extern "C" { pub fn ucal_clone_63(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_setTimeZone_63( cal: *mut UCalendar, zoneID: *const UChar, @@ -2035,7 +1656,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneID_63( cal: *const UCalendar, result: *mut UChar, @@ -2051,7 +1672,7 @@ pub enum UCalendarDisplayNameType { UCAL_DST = 2, UCAL_SHORT_DST = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneDisplayName_63( cal: *const UCalendar, type_: UCalendarDisplayNameType, @@ -2061,17 +1682,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_inDaylightTime_63(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_setGregorianChange_63( cal: *mut UCalendar, date: UDate, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getGregorianChange_63(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; } #[repr(u32)] @@ -2090,25 +1711,25 @@ pub enum UCalendarWallTimeOption { UCAL_WALLTIME_FIRST = 1, UCAL_WALLTIME_NEXT_VALID = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_getAttribute_63(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setAttribute_63(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_getAvailable_63(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getMillis_63(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_setMillis_63(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDate_63( cal: *mut UCalendar, year: i32, @@ -2117,7 +1738,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDateTime_63( cal: *mut UCalendar, year: i32, @@ -2129,10 +1750,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_equivalentTo_63(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_add_63( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2140,7 +1761,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_roll_63( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2148,23 +1769,23 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_get_63( cal: *const UCalendar, field: UCalendarDateFields, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_set_63(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_isSet_63(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_clearField_63(cal: *mut UCalendar, field: UCalendarDateFields); } -extern "C" { +unsafe extern "C" { pub fn ucal_clear_63(calendar: *mut UCalendar); } #[repr(u32)] @@ -2177,7 +1798,7 @@ pub enum UCalendarLimitType { UCAL_ACTUAL_MINIMUM = 4, UCAL_ACTUAL_MAXIMUM = 5, } -extern "C" { +unsafe extern "C" { pub fn ucal_getLimit_63( cal: *const UCalendar, field: UCalendarDateFields, @@ -2185,17 +1806,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getLocaleByType_63( cal: *const UCalendar, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTZDataVersion_63(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getCanonicalTimeZoneID_63( id: *const UChar, len: i32, @@ -2205,13 +1826,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getType_63( cal: *const UCalendar, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getKeywordValuesForLocale_63( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -2227,24 +1848,24 @@ pub enum UCalendarWeekdayType { UCAL_WEEKEND_ONSET = 2, UCAL_WEEKEND_CEASE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getDayOfWeekType_63( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> UCalendarWeekdayType; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWeekendTransition_63( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_isWeekend_63(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getFieldDifference_63( cal: *mut UCalendar, target: UDate, @@ -2260,7 +1881,7 @@ pub enum UTimeZoneTransitionType { UCAL_TZ_TRANSITION_PREVIOUS = 2, UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneTransitionDate_63( cal: *const UCalendar, type_: UTimeZoneTransitionType, @@ -2268,7 +1889,7 @@ extern "C" { status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWindowsTimeZoneID_63( id: *const UChar, len: i32, @@ -2277,7 +1898,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneIDForWindowsID_63( winid: *const UChar, len: i32, @@ -2287,10 +1908,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_init_63(status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn u_cleanup_63(); } pub type UMemAllocFn = ::std::option::Option< @@ -2309,7 +1930,7 @@ pub type UMemReallocFn = ::std::option::Option< pub type UMemFreeFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), >; -extern "C" { +unsafe extern "C" { pub fn u_setMemoryFunctions_63( context: *const ::std::os::raw::c_void, a: UMemAllocFn, @@ -2329,7 +1950,7 @@ pub type UMtxInitFn = ::std::option::Option< pub type UMtxFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), >; -extern "C" { +unsafe extern "C" { pub fn u_setMutexFunctions_63( context: *const ::std::os::raw::c_void, init: UMtxInitFn, @@ -2342,7 +1963,7 @@ extern "C" { pub type UMtxAtomicFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, >; -extern "C" { +unsafe extern "C" { pub fn u_setAtomicIncDecFunctions_63( context: *const ::std::os::raw::c_void, inc: UMtxAtomicFn, @@ -2377,102 +1998,29 @@ pub struct UConverterFromUnicodeArgs { pub targetLimit: *const ::std::os::raw::c_char, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterFromUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterFromUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2494,102 +2042,28 @@ pub struct UConverterToUnicodeArgs { pub targetLimit: *const UChar, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterToUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterToUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2669,36 +2143,36 @@ pub type UConverterFromUCallback = ::std::option::Option< pErrorCode: *mut UErrorCode, ), >; -extern "C" { +unsafe extern "C" { pub fn ucnv_compareNames_63( name1: *const ::std::os::raw::c_char, name2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ucnv_open_63( converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openU_63(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openCCSID_63( codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openPackage_63( packageName: *const ::std::os::raw::c_char, converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_safeClone_63( cnv: *const UConverter, stackBuffer: *mut ::std::os::raw::c_void, @@ -2706,10 +2180,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_close_63(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getSubstChars_63( converter: *const UConverter, subChars: *mut ::std::os::raw::c_char, @@ -2717,7 +2191,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstChars_63( converter: *mut UConverter, subChars: *const ::std::os::raw::c_char, @@ -2725,7 +2199,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstString_63( cnv: *mut UConverter, s: *const UChar, @@ -2733,7 +2207,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidChars_63( converter: *const UConverter, errBytes: *mut ::std::os::raw::c_char, @@ -2741,7 +2215,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidUChars_63( converter: *const UConverter, errUChars: *mut UChar, @@ -2749,22 +2223,22 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_reset_63(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetToUnicode_63(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetFromUnicode_63(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMaxCharSize_63(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMinCharSize_63(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDisplayName_63( converter: *const UConverter, displayLocale: *const ::std::os::raw::c_char, @@ -2773,25 +2247,25 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getName_63( converter: *const UConverter, err: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCCSID_63(converter: *const UConverter, err: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getPlatform_63( converter: *const UConverter, err: *mut UErrorCode, ) -> UConverterPlatform; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getType_63(converter: *const UConverter) -> UConverterType; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStarters_63( converter: *const UConverter, starters: *mut UBool, @@ -2805,7 +2279,7 @@ pub enum UConverterUnicodeSet { UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, UCNV_SET_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn ucnv_getUnicodeSet_63( cnv: *const UConverter, setFillIn: *mut USet, @@ -2813,21 +2287,21 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getToUCallBack_63( converter: *const UConverter, action: *mut UConverterToUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getFromUCallBack_63( converter: *const UConverter, action: *mut UConverterFromUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setToUCallBack_63( converter: *mut UConverter, newAction: UConverterToUCallback, @@ -2837,7 +2311,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFromUCallBack_63( converter: *mut UConverter, newAction: UConverterFromUCallback, @@ -2847,7 +2321,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUnicode_63( converter: *mut UConverter, target: *mut *mut ::std::os::raw::c_char, @@ -2859,7 +2333,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUnicode_63( converter: *mut UConverter, target: *mut *mut UChar, @@ -2871,7 +2345,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUChars_63( cnv: *mut UConverter, dest: *mut ::std::os::raw::c_char, @@ -2881,7 +2355,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUChars_63( cnv: *mut UConverter, dest: *mut UChar, @@ -2891,7 +2365,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getNextUChar_63( converter: *mut UConverter, source: *mut *const ::std::os::raw::c_char, @@ -2899,7 +2373,7 @@ extern "C" { err: *mut UErrorCode, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_convertEx_63( targetCnv: *mut UConverter, sourceCnv: *mut UConverter, @@ -2916,7 +2390,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_convert_63( toConverterName: *const ::std::os::raw::c_char, fromConverterName: *const ::std::os::raw::c_char, @@ -2927,7 +2401,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toAlgorithmic_63( algorithmicType: UConverterType, cnv: *mut UConverter, @@ -2938,7 +2412,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromAlgorithmic_63( cnv: *mut UConverter, algorithmicType: UConverterType, @@ -2949,87 +2423,87 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_flushCache_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAvailableName_63(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openAllNames_63(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAliases_63( alias: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAlias_63( alias: *const ::std::os::raw::c_char, n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAliases_63( alias: *const ::std::os::raw::c_char, aliases: *mut *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_openStandardNames_63( convName: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countStandards_63() -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandard_63( n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandardName_63( name: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCanonicalName_63( alias: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDefaultName_63() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setDefaultName_63(name: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fixFileSeparator_63(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); } -extern "C" { +unsafe extern "C" { pub fn ucnv_isAmbiguous_63(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFallback_63(cnv: *mut UConverter, usesFallback: UBool); } -extern "C" { +unsafe extern "C" { pub fn ucnv_usesFallback_63(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_detectUnicodeSignature_63( source: *const ::std::os::raw::c_char, sourceLength: i32, @@ -3037,13 +2511,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUCountPending_63(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUCountPending_63(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_isFixedWidth_63(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; } #[repr(u32)] @@ -3098,181 +2572,42 @@ pub struct UCharIterator { pub getState: UCharIteratorGetState, pub setState: UCharIteratorSetState, } -#[test] -fn bindgen_test_layout_UCharIterator() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UCharIterator)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCharIterator)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedField) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedField) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).move_) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasNext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasPrevious) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasPrevious) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(current) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).previous) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(previous) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedFn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedFn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getState) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setState) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(setState) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; impl Default for UCharIterator { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3302,22 +2637,22 @@ pub enum UNormalizationCheckResult { pub struct UNormalizer2 { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFCInstance_63(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFDInstance_63(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCInstance_63(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKDInstance_63(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCCasefoldInstance_63(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getInstance_63( packageName: *const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char, @@ -3325,17 +2660,17 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_openFiltered_63( norm2: *const UNormalizer2, filterSet: *const USet, pErrorCode: *mut UErrorCode, ) -> *mut UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_close_63(norm2: *mut UNormalizer2); } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalize_63( norm2: *const UNormalizer2, src: *const UChar, @@ -3345,7 +2680,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalizeSecondAndAppend_63( norm2: *const UNormalizer2, first: *mut UChar, @@ -3356,7 +2691,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_append_63( norm2: *const UNormalizer2, first: *mut UChar, @@ -3367,7 +2702,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getDecomposition_63( norm2: *const UNormalizer2, c: UChar32, @@ -3376,7 +2711,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getRawDecomposition_63( norm2: *const UNormalizer2, c: UChar32, @@ -3385,13 +2720,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_composePair_63(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getCombiningClass_63(norm2: *const UNormalizer2, c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isNormalized_63( norm2: *const UNormalizer2, s: *const UChar, @@ -3399,7 +2734,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_quickCheck_63( norm2: *const UNormalizer2, s: *const UChar, @@ -3407,7 +2742,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UNormalizationCheckResult; } -extern "C" { +unsafe extern "C" { pub fn unorm2_spanQuickCheckYes_63( norm2: *const UNormalizer2, s: *const UChar, @@ -3415,13 +2750,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryBefore_63(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryAfter_63(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isInert_63(norm2: *const UNormalizer2, c: UChar32) -> UBool; } impl UNormalizationMode { @@ -3517,13 +2852,13 @@ pub enum UColRuleOption { UCOL_TAILORING_ONLY = 0, UCOL_FULL_RULES = 1, } -extern "C" { +unsafe extern "C" { pub fn ucol_open_63( loc: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openRules_63( rules: *const UChar, rulesLength: i32, @@ -3533,7 +2868,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openFromShortString_63( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3541,14 +2876,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractions_63( coll: *const UCollator, conts: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractionsAndExpansions_63( coll: *const UCollator, contractions: *mut USet, @@ -3557,10 +2892,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_close_63(coll: *mut UCollator); } -extern "C" { +unsafe extern "C" { pub fn ucol_strcoll_63( coll: *const UCollator, source: *const UChar, @@ -3569,7 +2904,7 @@ extern "C" { targetLength: i32, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollUTF8_63( coll: *const UCollator, source: *const ::std::os::raw::c_char, @@ -3579,7 +2914,7 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_greater_63( coll: *const UCollator, source: *const UChar, @@ -3588,7 +2923,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_greaterOrEqual_63( coll: *const UCollator, source: *const UChar, @@ -3597,7 +2932,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_equal_63( coll: *const UCollator, source: *const UChar, @@ -3606,7 +2941,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollIter_63( coll: *const UCollator, sIter: *mut UCharIterator, @@ -3614,13 +2949,13 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_getStrength_63(coll: *const UCollator) -> UCollationStrength; } -extern "C" { +unsafe extern "C" { pub fn ucol_setStrength_63(coll: *mut UCollator, strength: UCollationStrength); } -extern "C" { +unsafe extern "C" { pub fn ucol_getReorderCodes_63( coll: *const UCollator, dest: *mut i32, @@ -3628,7 +2963,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setReorderCodes_63( coll: *mut UCollator, reorderCodes: *const i32, @@ -3636,7 +2971,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getEquivalentReorderCodes_63( reorderCode: i32, dest: *mut i32, @@ -3644,7 +2979,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getDisplayName_63( objLoc: *const ::std::os::raw::c_char, dispLoc: *const ::std::os::raw::c_char, @@ -3653,25 +2988,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getAvailable_63(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openAvailableLocales_63(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywords_63(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValues_63( keyword: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValuesForLocale_63( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -3679,7 +3014,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getFunctionalEquivalent_63( result: *mut ::std::os::raw::c_char, resultCapacity: i32, @@ -3689,10 +3024,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRules_63(coll: *const UCollator, length: *mut i32) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ucol_getShortDefinitionString_63( coll: *const UCollator, locale: *const ::std::os::raw::c_char, @@ -3701,7 +3036,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_normalizeShortDefinitionString_63( source: *const ::std::os::raw::c_char, destination: *mut ::std::os::raw::c_char, @@ -3710,7 +3045,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getSortKey_63( coll: *const UCollator, source: *const UChar, @@ -3719,7 +3054,7 @@ extern "C" { resultLength: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_nextSortKeyPart_63( coll: *const UCollator, iter: *mut UCharIterator, @@ -3737,7 +3072,7 @@ pub enum UColBoundMode { UCOL_BOUND_UPPER_LONG = 2, UCOL_BOUND_VALUE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn ucol_getBound_63( source: *const u8, sourceLength: i32, @@ -3748,13 +3083,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVersion_63(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_getUCAVersion_63(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_mergeSortkeys_63( src1: *const u8, src1Length: i32, @@ -3764,7 +3099,7 @@ extern "C" { destCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setAttribute_63( coll: *mut UCollator, attr: UColAttribute, @@ -3772,24 +3107,24 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getAttribute_63( coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode, ) -> UColAttributeValue; } -extern "C" { +unsafe extern "C" { pub fn ucol_setMaxVariable_63( coll: *mut UCollator, group: UColReorderCode, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getMaxVariable_63(coll: *const UCollator) -> UColReorderCode; } -extern "C" { +unsafe extern "C" { pub fn ucol_setVariableTop_63( coll: *mut UCollator, varTop: *const UChar, @@ -3797,13 +3132,13 @@ extern "C" { status: *mut UErrorCode, ) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVariableTop_63(coll: *const UCollator, status: *mut UErrorCode) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_restoreVariableTop_63(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucol_safeClone_63( coll: *const UCollator, stackBuffer: *mut ::std::os::raw::c_void, @@ -3811,7 +3146,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRulesEx_63( coll: *const UCollator, delta: UColRuleOption, @@ -3819,31 +3154,31 @@ extern "C" { bufferLen: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocale_63( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocaleByType_63( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getTailoredSet_63(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn ucol_getUnsafeSet_63( coll: *const UCollator, unsafe_: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_prepareShortStringOpen_63( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3851,7 +3186,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_cloneBinary_63( coll: *const UCollator, buffer: *mut u8, @@ -3859,7 +3194,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openBinary_63( bin: *const u8, length: i32, @@ -3877,13 +3212,13 @@ pub struct UCharsetDetector { pub struct UCharsetMatch { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ucsdet_open_63(status: *mut UErrorCode) -> *mut UCharsetDetector; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_close_63(ucsd: *mut UCharsetDetector); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setText_63( ucsd: *mut UCharsetDetector, textIn: *const ::std::os::raw::c_char, @@ -3891,7 +3226,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDeclaredEncoding_63( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3899,35 +3234,35 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detect_63( ucsd: *mut UCharsetDetector, status: *mut UErrorCode, ) -> *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detectAll_63( ucsd: *mut UCharsetDetector, matchesFound: *mut i32, status: *mut UErrorCode, ) -> *mut *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getName_63( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getConfidence_63(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getLanguage_63( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getUChars_63( ucsm: *const UCharsetMatch, buf: *mut UChar, @@ -3935,25 +3270,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getAllDetectableCharsets_63( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_isInputFilterEnabled_63(ucsd: *const UCharsetDetector) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_enableInputFilter_63(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getDetectableCharsets_63( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDetectableCharset_63( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3968,51 +3303,17 @@ pub struct UFieldPosition { pub beginIndex: i32, pub endIndex: i32, } -#[test] -fn bindgen_test_layout_UFieldPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(UFieldPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UFieldPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(field) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).beginIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(beginIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).endIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(endIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UFormattableType { @@ -4026,54 +3327,54 @@ pub enum UFormattableType { UFMT_COUNT = 7, } pub type UFormattable = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn ufmt_open_63(status: *mut UErrorCode) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_close_63(fmt: *mut UFormattable); } -extern "C" { +unsafe extern "C" { pub fn ufmt_getType_63(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; } -extern "C" { +unsafe extern "C" { pub fn ufmt_isNumeric_63(fmt: *const UFormattable) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDate_63(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDouble_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getLong_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getInt64_63(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getObject_63( fmt: *const UFormattable, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getUChars_63( fmt: *mut UFormattable, len: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayLength_63(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayItemByIndex_63( fmt: *mut UFormattable, n: i32, status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDecNumChars_63( fmt: *mut UFormattable, len: *mut i32, @@ -4108,13 +3409,13 @@ pub enum UDisplayContext { pub struct UFieldPositionIterator { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_open_63(status: *mut UErrorCode) -> *mut UFieldPositionIterator; } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_close_63(fpositer: *mut UFieldPositionIterator); } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_next_63( fpositer: *mut UFieldPositionIterator, beginIndex: *mut i32, @@ -4150,7 +3451,7 @@ pub enum UNumberFormatStyle { UNUM_CURRENCY_STANDARD = 16, UNUM_FORMAT_STYLE_COUNT = 17, } -extern "C" { +unsafe extern "C" { pub fn unum_open_63( style: UNumberFormatStyle, pattern: *const UChar, @@ -4160,13 +3461,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_close_63(fmt: *mut UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn unum_clone_63(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_format_63( fmt: *const UNumberFormat, number: i32, @@ -4176,7 +3477,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatInt64_63( fmt: *const UNumberFormat, number: i64, @@ -4186,7 +3487,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDouble_63( fmt: *const UNumberFormat, number: f64, @@ -4196,7 +3497,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleForFields_63( format: *const UNumberFormat, number: f64, @@ -4206,7 +3507,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDecimal_63( fmt: *const UNumberFormat, number: *const ::std::os::raw::c_char, @@ -4217,7 +3518,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleCurrency_63( fmt: *const UNumberFormat, number: f64, @@ -4228,7 +3529,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatUFormattable_63( fmt: *const UNumberFormat, number: *const UFormattable, @@ -4238,7 +3539,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parse_63( fmt: *const UNumberFormat, text: *const UChar, @@ -4247,7 +3548,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseInt64_63( fmt: *const UNumberFormat, text: *const UChar, @@ -4256,7 +3557,7 @@ extern "C" { status: *mut UErrorCode, ) -> i64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDouble_63( fmt: *const UNumberFormat, text: *const UChar, @@ -4265,7 +3566,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDecimal_63( fmt: *const UNumberFormat, text: *const UChar, @@ -4276,7 +3577,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDoubleCurrency_63( fmt: *const UNumberFormat, text: *const UChar, @@ -4286,7 +3587,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseToUFormattable_63( fmt: *const UNumberFormat, result: *mut UFormattable, @@ -4296,7 +3597,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn unum_applyPattern_63( format: *mut UNumberFormat, localized: UBool, @@ -4306,10 +3607,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getAvailable_63(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_countAvailable_63() -> i32; } #[repr(u32)] @@ -4347,23 +3648,23 @@ pub enum UNumberFormatAttribute { UNUM_PARSE_CASE_SENSITIVE = 4100, UNUM_SIGN_ALWAYS_SHOWN = 4101, } -extern "C" { +unsafe extern "C" { pub fn unum_getAttribute_63(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setAttribute_63( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, newValue: i32, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getDoubleAttribute_63( fmt: *const UNumberFormat, attr: UNumberFormatAttribute, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_setDoubleAttribute_63( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, @@ -4382,7 +3683,7 @@ pub enum UNumberFormatTextAttribute { UNUM_DEFAULT_RULESET = 6, UNUM_PUBLIC_RULESETS = 7, } -extern "C" { +unsafe extern "C" { pub fn unum_getTextAttribute_63( fmt: *const UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4391,7 +3692,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setTextAttribute_63( fmt: *mut UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4400,7 +3701,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_toPattern_63( fmt: *const UNumberFormat, isPatternLocalized: UBool, @@ -4442,7 +3743,7 @@ pub enum UNumberFormatSymbol { UNUM_EXPONENT_MULTIPLICATION_SYMBOL = 27, UNUM_FORMAT_SYMBOL_COUNT = 28, } -extern "C" { +unsafe extern "C" { pub fn unum_getSymbol_63( fmt: *const UNumberFormat, symbol: UNumberFormatSymbol, @@ -4451,7 +3752,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setSymbol_63( fmt: *mut UNumberFormat, symbol: UNumberFormatSymbol, @@ -4460,21 +3761,21 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getLocaleByType_63( fmt: *const UNumberFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_setContext_63( fmt: *mut UNumberFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getContext_63( fmt: *const UNumberFormat, type_: UDisplayContextType, @@ -4548,10 +3849,10 @@ pub enum UDateFormatField { UDAT_TIME_SEPARATOR_FIELD = 37, UDAT_FIELD_COUNT = 38, } -extern "C" { +unsafe extern "C" { pub fn udat_toCalendarDateField_63(field: UDateFormatField) -> UCalendarDateFields; } -extern "C" { +unsafe extern "C" { pub fn udat_open_63( timeStyle: UDateFormatStyle, dateStyle: UDateFormatStyle, @@ -4563,7 +3864,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_close_63(format: *mut UDateFormat); } #[repr(u32)] @@ -4575,14 +3876,14 @@ pub enum UDateFormatBooleanAttribute { UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udat_getBooleanAttribute_63( fmt: *const UDateFormat, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setBooleanAttribute_63( fmt: *mut UDateFormat, attr: UDateFormatBooleanAttribute, @@ -4590,10 +3891,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_clone_63(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_format_63( format: *const UDateFormat, dateToFormat: UDate, @@ -4603,7 +3904,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendar_63( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4613,7 +3914,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatForFields_63( format: *const UDateFormat, dateToFormat: UDate, @@ -4623,7 +3924,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendarForFields_63( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4633,7 +3934,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_parse_63( format: *const UDateFormat, text: *const UChar, @@ -4642,7 +3943,7 @@ extern "C" { status: *mut UErrorCode, ) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_parseCalendar_63( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4652,28 +3953,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_isLenient_63(fmt: *const UDateFormat) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setLenient_63(fmt: *mut UDateFormat, isLenient: UBool); } -extern "C" { +unsafe extern "C" { pub fn udat_getCalendar_63(fmt: *const UDateFormat) -> *const UCalendar; } -extern "C" { +unsafe extern "C" { pub fn udat_setCalendar_63(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormat_63(fmt: *const UDateFormat) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormatForField_63( fmt: *const UDateFormat, field: UChar, ) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormatForFields_63( fmt: *mut UDateFormat, fields: *const UChar, @@ -4681,28 +3982,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_setNumberFormat_63(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormat_63( fmt: *mut UDateFormat, numberFormatToAdopt: *mut UNumberFormat, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getAvailable_63(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_countAvailable_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_get2DigitYearStart_63(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_set2DigitYearStart_63(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_toPattern_63( fmt: *const UDateFormat, localized: UBool, @@ -4711,7 +4012,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPattern_63( format: *mut UDateFormat, localized: UBool, @@ -4756,7 +4057,7 @@ pub enum UDateFormatSymbolType { pub struct UDateFormatSymbols { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn udat_getSymbols_63( fmt: *const UDateFormat, type_: UDateFormatSymbolType, @@ -4766,10 +4067,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_countSymbols_63(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_setSymbols_63( format: *mut UDateFormat, type_: UDateFormatSymbolType, @@ -4779,28 +4080,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getLocaleByType_63( fmt: *const UDateFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_setContext_63( fmt: *mut UDateFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getContext_63( fmt: *const UDateFormat, type_: UDisplayContextType, status: *mut UErrorCode, ) -> UDisplayContext; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeDate_63( fmt: *const UDateFormat, result: *mut UChar, @@ -4808,7 +4109,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeTime_63( fmt: *const UDateFormat, result: *mut UChar, @@ -4816,7 +4117,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPatternRelative_63( format: *mut UDateFormat, datePattern: *const UChar, @@ -4838,10 +4139,10 @@ pub type UDateFormatOpener = ::std::option::Option< status: *mut UErrorCode, ) -> *mut UDateFormat, >; -extern "C" { +unsafe extern "C" { pub fn udat_registerOpener_63(opener: UDateFormatOpener, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_unregisterOpener_63( opener: UDateFormatOpener, status: *mut UErrorCode, @@ -4893,25 +4194,25 @@ pub enum UDateTimePatternConflict { UDATPG_CONFLICT = 2, UDATPG_CONFLICT_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn udatpg_open_63( locale: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openEmpty_63(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_close_63(dtpg: *mut UDateTimePatternGenerator); } -extern "C" { +unsafe extern "C" { pub fn udatpg_clone_63( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPattern_63( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -4921,7 +4222,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPatternWithOptions_63( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -4932,7 +4233,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getSkeleton_63( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -4942,7 +4243,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBaseSkeleton_63( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -4952,7 +4253,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_addPattern_63( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -4964,7 +4265,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UDateTimePatternConflict; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemFormat_63( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -4972,14 +4273,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemFormat_63( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemName_63( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -4987,14 +4288,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemName_63( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getFieldDisplayName_63( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5004,33 +4305,33 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormat_63( dtpg: *const UDateTimePatternGenerator, dtFormat: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormat_63( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDecimal_63( dtpg: *mut UDateTimePatternGenerator, decimal: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDecimal_63( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypes_63( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5042,7 +4343,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypesWithOptions_63( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5055,19 +4356,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openSkeletons_63( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openBaseSkeletons_63( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getPatternForSkeleton_63( dtpg: *const UDateTimePatternGenerator, skeleton: *const UChar, @@ -5088,111 +4389,28 @@ pub struct UDataInfo { pub formatVersion: [u8; 4usize], pub dataVersion: [u8; 4usize], } -#[test] -fn bindgen_test_layout_UDataInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(UDataInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(UDataInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedWord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isBigEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(isBigEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charsetFamily) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(charsetFamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeofUChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(sizeofUChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedByte) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedByte) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataFormat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataFormat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formatVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(formatVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UDataMemory { @@ -5206,7 +4424,7 @@ pub type UDataMemoryIsAcceptable = ::std::option::Option< pInfo: *const UDataInfo, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn udata_open_63( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5214,7 +4432,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_openChoice_63( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5224,19 +4442,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_close_63(pData: *mut UDataMemory); } -extern "C" { +unsafe extern "C" { pub fn udata_getMemory_63(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn udata_getInfo_63(pData: *mut UDataMemory, pInfo: *mut UDataInfo); } -extern "C" { +unsafe extern "C" { pub fn udata_setCommonData_63(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udata_setAppData_63( packageName: *const ::std::os::raw::c_char, data: *const ::std::os::raw::c_void, @@ -5255,7 +4473,7 @@ pub enum UDataFileAccess { UDATA_NO_FILES = 3, UDATA_FILE_ACCESS_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udata_setFileAccess_63(access: UDataFileAccess, status: *mut UErrorCode); } #[repr(C)] @@ -5269,16 +4487,16 @@ pub enum UListFormatterField { ULISTFMT_LITERAL_FIELD = 0, ULISTFMT_ELEMENT_FIELD = 1, } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_open_63( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_close_63(listfmt: *mut UListFormatter); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_format_63( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5290,7 +4508,7 @@ extern "C" { ) -> i32; } pub type va_list = __builtin_va_list; -extern "C" { +unsafe extern "C" { pub fn u_formatMessage_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5301,7 +4519,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessage_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5312,7 +4530,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessage_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5323,7 +4541,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessage_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5334,7 +4552,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_formatMessageWithError_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5346,7 +4564,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessageWithError_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5358,7 +4576,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessageWithError_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5370,7 +4588,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessageWithError_63( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5383,7 +4601,7 @@ extern "C" { ); } pub type UMessageFormat = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn umsg_open_63( pattern: *const UChar, patternLength: i32, @@ -5392,19 +4610,19 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_close_63(format: *mut UMessageFormat); } -extern "C" { +unsafe extern "C" { pub fn umsg_clone_63(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_setLocale_63(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn umsg_getLocale_63(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn umsg_applyPattern_63( fmt: *mut UMessageFormat, pattern: *const UChar, @@ -5413,7 +4631,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_toPattern_63( fmt: *const UMessageFormat, result: *mut UChar, @@ -5421,7 +4639,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_format_63( fmt: *const UMessageFormat, result: *mut UChar, @@ -5430,7 +4648,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_vformat_63( fmt: *const UMessageFormat, result: *mut UChar, @@ -5439,7 +4657,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_parse_63( fmt: *const UMessageFormat, source: *const UChar, @@ -5449,7 +4667,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn umsg_vparse_63( fmt: *const UMessageFormat, source: *const UChar, @@ -5459,7 +4677,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_autoQuoteApostrophe_63( pattern: *const UChar, patternLength: i32, @@ -5478,7 +4696,7 @@ pub struct UNumberFormatter { pub struct UFormattedNumber { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocale_63( skeleton: *const UChar, skeletonLen: i32, @@ -5486,10 +4704,10 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openResult_63(ec: *mut UErrorCode) -> *mut UFormattedNumber; } -extern "C" { +unsafe extern "C" { pub fn unumf_formatInt_63( uformatter: *const UNumberFormatter, value: i64, @@ -5497,7 +4715,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDouble_63( uformatter: *const UNumberFormatter, value: f64, @@ -5505,7 +4723,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDecimal_63( uformatter: *const UNumberFormatter, value: *const ::std::os::raw::c_char, @@ -5514,7 +4732,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToString_63( uresult: *const UFormattedNumber, buffer: *mut UChar, @@ -5522,24 +4740,24 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultNextFieldPosition_63( uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultGetAllFieldPositions_63( uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_close_63(uformatter: *mut UNumberFormatter); } -extern "C" { +unsafe extern "C" { pub fn unumf_closeResult_63(uresult: *mut UFormattedNumber); } #[repr(u32)] @@ -5554,23 +4772,23 @@ pub enum UPluralType { pub struct UPluralRules { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uplrules_open_63( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_openForType_63( locale: *const ::std::os::raw::c_char, type_: UPluralType, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_close_63(uplrules: *mut UPluralRules); } -extern "C" { +unsafe extern "C" { pub fn uplrules_select_63( uplrules: *const UPluralRules, number: f64, @@ -5579,7 +4797,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectWithFormat_63( uplrules: *const UPluralRules, number: f64, @@ -5589,53 +4807,53 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_getKeywords_63( uplrules: *const UPluralRules, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn u_getDataDirectory_63() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setDataDirectory_63(directory: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_63(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_63( path: *const ::std::os::raw::c_char, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_charsToUChars_63(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_UCharsToChars_63(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_strlen_63(s: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_countChar32_63(s: *const UChar, length: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strHasMoreChar32Than_63(s: *const UChar, length: i32, number: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_strcat_63(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncat_63(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strstr_63(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindFirst_63( s: *const UChar, length: i32, @@ -5643,16 +4861,16 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr_63(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr32_63(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrstr_63(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindLast_63( s: *const UChar, length: i32, @@ -5660,35 +4878,35 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr_63(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr32_63(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strpbrk_63(string: *const UChar, matchSet: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcspn_63(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strspn_63(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strtok_r_63( src: *mut UChar, delim: *const UChar, saveState: *mut *mut UChar, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcmp_63(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcmpCodePointOrder_63(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompare_63( s1: *const UChar, length1: i32, @@ -5697,14 +4915,14 @@ extern "C" { codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompareIter_63( iter1: *mut UCharIterator, iter2: *mut UCharIterator, codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCaseCompare_63( s1: *const UChar, length1: i32, @@ -5714,78 +4932,78 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmp_63(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmpCodePointOrder_63(s1: *const UChar, s2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcasecmp_63(s1: *const UChar, s2: *const UChar, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncasecmp_63(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcasecmp_63(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcpy_63(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncpy_63(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrcpy_63(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrncpy_63( dst: *mut UChar, src: *const ::std::os::raw::c_char, n: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_austrcpy_63( dst: *mut ::std::os::raw::c_char, src: *const UChar, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_austrncpy_63( dst: *mut ::std::os::raw::c_char, src: *const UChar, n: i32, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_memcpy_63(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memmove_63(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memset_63(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memcmp_63(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcmpCodePointOrder_63(s1: *const UChar, s2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memchr_63(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memchr32_63(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr_63(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr32_63(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_unescape_63( src: *const ::std::os::raw::c_char, dest: *mut UChar, @@ -5795,7 +5013,7 @@ extern "C" { pub type UNESCAPE_CHAR_AT = ::std::option::Option< unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, >; -extern "C" { +unsafe extern "C" { pub fn u_unescapeAt_63( charAt: UNESCAPE_CHAR_AT, offset: *mut i32, @@ -5803,7 +5021,7 @@ extern "C" { context: *mut ::std::os::raw::c_void, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strToUpper_63( dest: *mut UChar, destCapacity: i32, @@ -5813,7 +5031,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToLower_63( dest: *mut UChar, destCapacity: i32, @@ -5823,7 +5041,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToTitle_63( dest: *mut UChar, destCapacity: i32, @@ -5834,7 +5052,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strFoldCase_63( dest: *mut UChar, destCapacity: i32, @@ -5844,7 +5062,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToWCS_63( dest: *mut wchar_t, destCapacity: i32, @@ -5854,7 +5072,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut wchar_t; } -extern "C" { +unsafe extern "C" { pub fn u_strFromWCS_63( dest: *mut UChar, destCapacity: i32, @@ -5864,7 +5082,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8_63( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -5874,7 +5092,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8_63( dest: *mut UChar, destCapacity: i32, @@ -5884,7 +5102,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8WithSub_63( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -5896,7 +5114,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8WithSub_63( dest: *mut UChar, destCapacity: i32, @@ -5908,7 +5126,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8Lenient_63( dest: *mut UChar, destCapacity: i32, @@ -5918,7 +5136,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32_63( dest: *mut UChar32, destCapacity: i32, @@ -5928,7 +5146,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32_63( dest: *mut UChar, destCapacity: i32, @@ -5938,7 +5156,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32WithSub_63( dest: *mut UChar32, destCapacity: i32, @@ -5950,7 +5168,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32WithSub_63( dest: *mut UChar, destCapacity: i32, @@ -5962,7 +5180,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToJavaModifiedUTF8_63( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -5972,7 +5190,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromJavaModifiedUTF8WithSub_63( dest: *mut UChar, destCapacity: i32, @@ -6010,82 +5228,24 @@ pub struct UReplaceableCallbacks { unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), >, } -#[test] -fn bindgen_test_layout_UReplaceableCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charAt) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(charAt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).char32At) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(char32At) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(copy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; pub type UTransliterator = *mut ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] @@ -6101,62 +5261,20 @@ pub struct UTransPosition { pub start: i32, pub limit: i32, } -#[test] -fn bindgen_test_layout_UTransPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(UTransPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UTransPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextLimit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(limit) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { pub fn utrans_openU_63( id: *const UChar, idLength: i32, @@ -6167,34 +5285,34 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_openInverse_63( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_clone_63( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_close_63(trans: *mut UTransliterator); } -extern "C" { +unsafe extern "C" { pub fn utrans_getUnicodeID_63( trans: *const UTransliterator, resultLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn utrans_register_63(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn utrans_unregisterID_63(id: *const UChar, idLength: i32); } -extern "C" { +unsafe extern "C" { pub fn utrans_setFilter_63( trans: *mut UTransliterator, filterPattern: *const UChar, @@ -6202,13 +5320,13 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_countAvailableIDs_63() -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_openIDs_63(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn utrans_trans_63( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6218,7 +5336,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncremental_63( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6227,7 +5345,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transUChars_63( trans: *const UTransliterator, text: *mut UChar, @@ -6238,7 +5356,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncrementalUChars_63( trans: *const UTransliterator, text: *mut UChar, @@ -6248,7 +5366,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_toRules_63( trans: *const UTransliterator, escapeUnprintable: UBool, @@ -6257,7 +5375,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_getSourceSet_63( trans: *const UTransliterator, ignoreFilter: UBool, @@ -6265,7 +5383,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn utrans_open_63( id: *const ::std::os::raw::c_char, dir: UTransDirection, @@ -6275,17 +5393,17 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_getID_63( trans: *const UTransliterator, buf: *mut ::std::os::raw::c_char, bufCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_unregister_63(id: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn utrans_getAvailableID_63( index: i32, buf: *mut ::std::os::raw::c_char, @@ -6300,61 +5418,15 @@ pub union UCPTrieData { pub ptr32: *const u32, pub ptr8: *const u8, } -#[test] -fn bindgen_test_layout_UCPTrieData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(UCPTrieData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrieData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr16) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr8) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; impl Default for UCPTrieData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6381,151 +5453,28 @@ pub struct UCPTrie { pub dataNullOffset: i32, pub nullValue: u32, } -#[test] -fn bindgen_test_layout_UCPTrie() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UCPTrie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrie)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).indexLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(indexLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).highStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(highStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shifted12HighStart) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(shifted12HighStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valueWidth) as usize - ptr as usize }, - 31usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(valueWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved32) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index3NullOffset) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index3NullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataNullOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataNullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nullValue) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(nullValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; impl Default for UCPTrie { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6550,7 +5499,7 @@ pub enum UCPTrieValueWidth { UCPTRIE_VALUE_BITS_32 = 1, UCPTRIE_VALUE_BITS_8 = 2, } -extern "C" { +unsafe extern "C" { pub fn ucptrie_openFromBinary_63( type_: UCPTrieType, valueWidth: UCPTrieValueWidth, @@ -6560,19 +5509,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UCPTrie; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_close_63(trie: *mut UCPTrie); } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getType_63(trie: *const UCPTrie) -> UCPTrieType; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getValueWidth_63(trie: *const UCPTrie) -> UCPTrieValueWidth; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_get_63(trie: *const UCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getRange_63( trie: *const UCPTrie, start: UChar32, @@ -6583,7 +5532,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_toBinary_63( trie: *const UCPTrie, data: *mut ::std::os::raw::c_void, @@ -6591,13 +5540,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallIndex_63(trie: *const UCPTrie, c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallU8Index_63(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalU8PrevIndex_63( trie: *const UCPTrie, c: UChar32, @@ -6610,38 +5559,38 @@ extern "C" { pub struct UMutableCPTrie { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_open_63( initialValue: u32, errorValue: u32, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_clone_63( other: *const UMutableCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_close_63(trie: *mut UMutableCPTrie); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPMap_63( map: *const UCPMap, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPTrie_63( trie: *const UCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_get_63(trie: *const UMutableCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_getRange_63( trie: *const UMutableCPTrie, start: UChar32, @@ -6652,7 +5601,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_set_63( trie: *mut UMutableCPTrie, c: UChar32, @@ -6660,7 +5609,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_setRange_63( trie: *mut UMutableCPTrie, start: UChar32, @@ -6669,7 +5618,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_buildImmutable_63( trie: *mut UMutableCPTrie, type_: UCPTrieType, @@ -6686,61 +5635,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); diff --git a/rust_icu_sys/bindgen/lib_71.rs b/rust_icu_sys/bindgen/lib_71.rs index 4b19b31..e71975a 100644 --- a/rust_icu_sys/bindgen/lib_71.rs +++ b/rust_icu_sys/bindgen/lib_71.rs @@ -1,23 +1,26 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type UBool = i8; pub type UChar = u16; pub type UChar32 = i32; pub type UVersionInfo = [u8; 4usize]; -extern "C" { +unsafe extern "C" { pub fn u_versionFromString_71( versionArray: *mut u8, versionString: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn u_versionFromUString_71(versionArray: *mut u8, versionString: *const UChar); } -extern "C" { - pub fn u_versionToString_71(versionArray: *mut u8, versionString: *mut ::std::os::raw::c_char); +unsafe extern "C" { + pub fn u_versionToString_71( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); } -extern "C" { +unsafe extern "C" { pub fn u_getVersion_71(versionArray: *mut u8); } pub type UDate = f64; @@ -212,7 +215,7 @@ pub enum UErrorCode { U_PLUGIN_DIDNT_SET_LEVEL = 66817, U_PLUGIN_ERROR_LIMIT = 66818, } -extern "C" { +unsafe extern "C" { pub fn u_errorName_71(code: UErrorCode) -> *const ::std::os::raw::c_char; } #[repr(C)] @@ -220,37 +223,37 @@ extern "C" { pub struct UEnumeration { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uenum_close_71(en: *mut UEnumeration); } -extern "C" { +unsafe extern "C" { pub fn uenum_count_71(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uenum_unext_71( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn uenum_next_71( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uenum_reset_71(en: *mut UEnumeration, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uenum_openUCharStringsEnumeration_71( strings: *const *const UChar, count: i32, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uenum_openCharStringsEnumeration_71( strings: *const *const ::std::os::raw::c_char, count: i32, @@ -265,13 +268,13 @@ pub enum ULocDataLocaleType { ULOC_REQUESTED_LOCALE = 2, ULOC_DATA_LOCALE_TYPE_LIMIT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_getDefault_71() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_setDefault_71(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uloc_getLanguage_71( localeID: *const ::std::os::raw::c_char, language: *mut ::std::os::raw::c_char, @@ -279,7 +282,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getScript_71( localeID: *const ::std::os::raw::c_char, script: *mut ::std::os::raw::c_char, @@ -287,7 +290,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getCountry_71( localeID: *const ::std::os::raw::c_char, country: *mut ::std::os::raw::c_char, @@ -295,7 +298,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getVariant_71( localeID: *const ::std::os::raw::c_char, variant: *mut ::std::os::raw::c_char, @@ -303,7 +306,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getName_71( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -311,7 +314,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_canonicalize_71( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -319,20 +322,20 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Language_71( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Country_71( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLCID_71(localeID: *const ::std::os::raw::c_char) -> u32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayLanguage_71( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -341,7 +344,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayScript_71( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -350,7 +353,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayCountry_71( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -359,7 +362,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayVariant_71( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -368,7 +371,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeyword_71( keyword: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -377,7 +380,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeywordValue_71( locale: *const ::std::os::raw::c_char, keyword: *const ::std::os::raw::c_char, @@ -387,7 +390,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayName_71( localeID: *const ::std::os::raw::c_char, inLocaleID: *const ::std::os::raw::c_char, @@ -396,10 +399,10 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getAvailable_71(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_countAvailable_71() -> i32; } #[repr(u32)] @@ -410,19 +413,19 @@ pub enum ULocAvailableType { ULOC_AVAILABLE_WITH_LEGACY_ALIASES = 2, ULOC_AVAILABLE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_openAvailableByType_71( type_: ULocAvailableType, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOLanguages_71() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOCountries_71() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getParent_71( localeID: *const ::std::os::raw::c_char, parent: *mut ::std::os::raw::c_char, @@ -430,7 +433,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getBaseName_71( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -438,13 +441,13 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_openKeywords_71( localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getKeywordValue_71( localeID: *const ::std::os::raw::c_char, keywordName: *const ::std::os::raw::c_char, @@ -453,7 +456,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_setKeywordValue_71( keywordName: *const ::std::os::raw::c_char, keywordValue: *const ::std::os::raw::c_char, @@ -462,7 +465,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_isRightToLeft_71(locale: *const ::std::os::raw::c_char) -> UBool; } #[repr(u32)] @@ -474,13 +477,13 @@ pub enum ULayoutType { ULOC_LAYOUT_BTT = 3, ULOC_LAYOUT_UNKNOWN = 4, } -extern "C" { +unsafe extern "C" { pub fn uloc_getCharacterOrientation_71( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> ULayoutType; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLineOrientation_71( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, @@ -493,7 +496,7 @@ pub enum UAcceptResult { ULOC_ACCEPT_VALID = 1, ULOC_ACCEPT_FALLBACK = 2, } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguageFromHTTP_71( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -503,7 +506,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguage_71( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -514,7 +517,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLocaleForLCID_71( hostID: u32, locale: *mut ::std::os::raw::c_char, @@ -522,7 +525,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_addLikelySubtags_71( localeID: *const ::std::os::raw::c_char, maximizedLocaleID: *mut ::std::os::raw::c_char, @@ -530,7 +533,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_minimizeSubtags_71( localeID: *const ::std::os::raw::c_char, minimizedLocaleID: *mut ::std::os::raw::c_char, @@ -538,7 +541,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_forLanguageTag_71( langtag: *const ::std::os::raw::c_char, localeID: *mut ::std::os::raw::c_char, @@ -547,7 +550,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLanguageTag_71( localeID: *const ::std::os::raw::c_char, langtag: *mut ::std::os::raw::c_char, @@ -556,23 +559,23 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleKey_71( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleType_71( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyKey_71( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyType_71( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, @@ -590,13 +593,13 @@ pub enum UCPMapRangeOption { UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, } -extern "C" { +unsafe extern "C" { pub fn ucpmap_get_71(map: *const UCPMap, c: UChar32) -> u32; } pub type UCPMapValueFilter = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, >; -extern "C" { +unsafe extern "C" { pub fn ucpmap_getRange_71( map: *const UCPMap, start: UChar32, @@ -837,115 +840,115 @@ pub enum UPropertyNameChoice { U_LONG_PROPERTY_NAME = 1, U_PROPERTY_NAME_CHOICE_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn u_hasBinaryProperty_71(c: UChar32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_stringHasBinaryProperty_71(s: *const UChar, length: i32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getBinaryPropertySet_71( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const USet; } -extern "C" { +unsafe extern "C" { pub fn u_isUAlphabetic_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isULowercase_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUUppercase_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUWhiteSpace_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyValue_71(c: UChar32, which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMinValue_71(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMaxValue_71(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMap_71( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const UCPMap; } -extern "C" { +unsafe extern "C" { pub fn u_getNumericValue_71(c: UChar32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn u_islower_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isupper_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_istitle_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdigit_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalpha_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalnum_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isxdigit_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_ispunct_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isgraph_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isblank_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdefined_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isspace_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaSpaceChar_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isWhitespace_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_iscntrl_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isISOControl_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isprint_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isbase_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charDirection_71(c: UChar32) -> UCharDirection; } -extern "C" { +unsafe extern "C" { pub fn u_isMirrored_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charMirror_71(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_getBidiPairedBracket_71(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charType_71(c: UChar32) -> i8; } pub type UCharEnumTypeRange = ::std::option::Option< @@ -956,19 +959,19 @@ pub type UCharEnumTypeRange = ::std::option::Option< type_: UCharCategory, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharTypes_71( enumRange: UCharEnumTypeRange, context: *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn u_getCombiningClass_71(c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn u_charDigitValue_71(c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charName_71( code: UChar32, nameChoice: UCharNameChoice, @@ -977,7 +980,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getISOComment_71( c: UChar32, dest: *mut ::std::os::raw::c_char, @@ -985,7 +988,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charFromName_71( nameChoice: UCharNameChoice, name: *const ::std::os::raw::c_char, @@ -1001,7 +1004,7 @@ pub type UEnumCharNamesFn = ::std::option::Option< length: i32, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharNames_71( start: UChar32, limit: UChar32, @@ -1011,68 +1014,68 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyName_71( property: UProperty, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyEnum_71(alias: *const ::std::os::raw::c_char) -> UProperty; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueName_71( property: UProperty, value: i32, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueEnum_71( property: UProperty, alias: *const ::std::os::raw::c_char, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_isIDStart_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDPart_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDIgnorable_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDStart_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDPart_71(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_tolower_71(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_toupper_71(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_totitle_71(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_foldCase_71(c: UChar32, options: u32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_digit_71(ch: UChar32, radix: i8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_forDigit_71(digit: i32, radix: i8) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charAge_71(c: UChar32, versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getUnicodeVersion_71(versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getFC_NFKC_Closure_71( c: UChar32, dest: *mut UChar, @@ -1080,10 +1083,10 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_close_71(ut: *mut UText) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUTF8_71( ut: *mut UText, s: *const ::std::os::raw::c_char, @@ -1091,7 +1094,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUChars_71( ut: *mut UText, s: *const UChar, @@ -1099,7 +1102,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_clone_71( dest: *mut UText, src: *const UText, @@ -1108,46 +1111,46 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_equals_71(a: *const UText, b: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_nativeLength_71(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_isLengthExpensive_71(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_char32At_71(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_current32_71(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32_71(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32_71(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32From_71(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32From_71(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_getNativeIndex_71(ut: *const UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_setNativeIndex_71(ut: *mut UText, nativeIndex: i64); } -extern "C" { +unsafe extern "C" { pub fn utext_moveIndex32_71(ut: *mut UText, delta: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_getPreviousNativeIndex_71(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_extract_71( ut: *mut UText, nativeStart: i64, @@ -1157,13 +1160,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_isWritable_71(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_hasMetaData_71(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_replace_71( ut: *mut UText, nativeStart: i64, @@ -1173,7 +1176,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_copy_71( ut: *mut UText, nativeStart: i64, @@ -1183,7 +1186,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utext_freeze_71(ut: *mut UText); } pub type UTextClone = ::std::option::Option< @@ -1253,181 +1256,34 @@ pub struct UTextFuncs { pub spare2: UTextClose, pub spare3: UTextClose, } -#[test] -fn bindgen_test_layout_UTextFuncs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UTextFuncs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UTextFuncs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(tableSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(clone) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(nativeLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(access) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(copy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapOffsetToNative) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapOffsetToNative) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapNativeIndexToUTF16) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapNativeIndexToUTF16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare3) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare3) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] pub struct UText { @@ -1456,231 +1312,40 @@ pub struct UText { pub privB: i32, pub privC: i32, } -#[test] -fn bindgen_test_layout_UText() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(UText)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UText)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).providerProperties) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(providerProperties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeOfStruct) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(sizeOfStruct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(extraSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeIndexingLimit) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(nativeIndexingLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeStart) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkContents) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkContents) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFuncs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pFuncs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pExtra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(p)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(q)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(r)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privP) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(a)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(b)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, - 124usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(c)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privA) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privB) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privC) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privC) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; impl Default for UText { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1690,7 +1355,7 @@ impl Default for UText { } } } -extern "C" { +unsafe extern "C" { pub fn utext_setup_71(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; } #[repr(C)] @@ -1706,61 +1371,17 @@ pub struct UParseError { pub preContext: [UChar; 16usize], pub postContext: [UChar; 16usize], } -#[test] -fn bindgen_test_layout_UParseError() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(UParseError)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UParseError)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(preContext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).postContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(postContext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UBreakIteratorType { @@ -1813,7 +1434,7 @@ pub enum USentenceBreakTag { UBRK_SENTENCE_TERM_LIMIT = 100, UBRK_SENTENCE_SEP_LIMIT = 200, } -extern "C" { +unsafe extern "C" { pub fn ubrk_open_71( type_: UBreakIteratorType, locale: *const ::std::os::raw::c_char, @@ -1822,7 +1443,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openRules_71( rules: *const UChar, rulesLength: i32, @@ -1832,7 +1453,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openBinaryRules_71( binaryRules: *const u8, rulesLength: i32, @@ -1841,7 +1462,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_safeClone_71( bi: *const UBreakIterator, stackBuffer: *mut ::std::os::raw::c_void, @@ -1849,14 +1470,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_clone_71(bi: *const UBreakIterator, status: *mut UErrorCode) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_close_71(bi: *mut UBreakIterator); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setText_71( bi: *mut UBreakIterator, text: *const UChar, @@ -1864,43 +1485,43 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setUText_71(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_current_71(bi: *const UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_next_71(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_previous_71(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_first_71(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_last_71(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_preceding_71(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_following_71(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getAvailable_71(index: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_countAvailable_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_isBoundary_71(bi: *mut UBreakIterator, offset: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatus_71(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatusVec_71( bi: *mut UBreakIterator, fillInVec: *mut i32, @@ -1908,17 +1529,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getLocaleByType_71( bi: *const UBreakIterator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_refreshUText_71(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_getBinaryRules_71( bi: *mut UBreakIterator, binaryRules: *mut u8, @@ -2008,7 +1629,7 @@ pub enum USystemTimeZoneType { UCAL_ZONE_TYPE_CANONICAL = 1, UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZoneIDEnumeration_71( zoneType: USystemTimeZoneType, region: *const ::std::os::raw::c_char, @@ -2016,39 +1637,39 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZones_71(ec: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openCountryTimeZones_71( country: *const ::std::os::raw::c_char, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDefaultTimeZone_71( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setDefaultTimeZone_71(zoneID: *const UChar, ec: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_getHostTimeZone_71( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDSTSavings_71(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getNow_71() -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_open_71( zoneID: *const UChar, len: i32, @@ -2057,13 +1678,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_close_71(cal: *mut UCalendar); } -extern "C" { +unsafe extern "C" { pub fn ucal_clone_71(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_setTimeZone_71( cal: *mut UCalendar, zoneID: *const UChar, @@ -2071,7 +1692,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneID_71( cal: *const UCalendar, result: *mut UChar, @@ -2087,7 +1708,7 @@ pub enum UCalendarDisplayNameType { UCAL_DST = 2, UCAL_SHORT_DST = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneDisplayName_71( cal: *const UCalendar, type_: UCalendarDisplayNameType, @@ -2097,17 +1718,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_inDaylightTime_71(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_setGregorianChange_71( cal: *mut UCalendar, date: UDate, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getGregorianChange_71(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; } #[repr(u32)] @@ -2126,25 +1747,25 @@ pub enum UCalendarWallTimeOption { UCAL_WALLTIME_FIRST = 1, UCAL_WALLTIME_NEXT_VALID = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_getAttribute_71(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setAttribute_71(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_getAvailable_71(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_countAvailable_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getMillis_71(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_setMillis_71(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDate_71( cal: *mut UCalendar, year: i32, @@ -2153,7 +1774,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDateTime_71( cal: *mut UCalendar, year: i32, @@ -2165,10 +1786,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_equivalentTo_71(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_add_71( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2176,7 +1797,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_roll_71( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2184,23 +1805,23 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_get_71( cal: *const UCalendar, field: UCalendarDateFields, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_set_71(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_isSet_71(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_clearField_71(cal: *mut UCalendar, field: UCalendarDateFields); } -extern "C" { +unsafe extern "C" { pub fn ucal_clear_71(calendar: *mut UCalendar); } #[repr(u32)] @@ -2213,7 +1834,7 @@ pub enum UCalendarLimitType { UCAL_ACTUAL_MINIMUM = 4, UCAL_ACTUAL_MAXIMUM = 5, } -extern "C" { +unsafe extern "C" { pub fn ucal_getLimit_71( cal: *const UCalendar, field: UCalendarDateFields, @@ -2221,17 +1842,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getLocaleByType_71( cal: *const UCalendar, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTZDataVersion_71(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getCanonicalTimeZoneID_71( id: *const UChar, len: i32, @@ -2241,13 +1862,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getType_71( cal: *const UCalendar, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getKeywordValuesForLocale_71( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -2263,24 +1884,24 @@ pub enum UCalendarWeekdayType { UCAL_WEEKEND_ONSET = 2, UCAL_WEEKEND_CEASE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getDayOfWeekType_71( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> UCalendarWeekdayType; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWeekendTransition_71( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_isWeekend_71(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getFieldDifference_71( cal: *mut UCalendar, target: UDate, @@ -2296,7 +1917,7 @@ pub enum UTimeZoneTransitionType { UCAL_TZ_TRANSITION_PREVIOUS = 2, UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneTransitionDate_71( cal: *const UCalendar, type_: UTimeZoneTransitionType, @@ -2304,7 +1925,7 @@ extern "C" { status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWindowsTimeZoneID_71( id: *const UChar, len: i32, @@ -2313,7 +1934,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneIDForWindowsID_71( winid: *const UChar, len: i32, @@ -2333,7 +1954,7 @@ pub enum UTimeZoneLocalOption { UCAL_TZ_LOCAL_DAYLIGHT_FORMER = 7, UCAL_TZ_LOCAL_DAYLIGHT_LATTER = 15, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneOffsetFromLocal_71( cal: *const UCalendar, nonExistingTimeOpt: UTimeZoneLocalOption, @@ -2343,10 +1964,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_init_71(status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn u_cleanup_71(); } pub type UMemAllocFn = ::std::option::Option< @@ -2365,7 +1986,7 @@ pub type UMemReallocFn = ::std::option::Option< pub type UMemFreeFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), >; -extern "C" { +unsafe extern "C" { pub fn u_setMemoryFunctions_71( context: *const ::std::os::raw::c_void, a: UMemAllocFn, @@ -2385,7 +2006,7 @@ pub type UMtxInitFn = ::std::option::Option< pub type UMtxFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), >; -extern "C" { +unsafe extern "C" { pub fn u_setMutexFunctions_71( context: *const ::std::os::raw::c_void, init: UMtxInitFn, @@ -2398,7 +2019,7 @@ extern "C" { pub type UMtxAtomicFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, >; -extern "C" { +unsafe extern "C" { pub fn u_setAtomicIncDecFunctions_71( context: *const ::std::os::raw::c_void, inc: UMtxAtomicFn, @@ -2433,102 +2054,29 @@ pub struct UConverterFromUnicodeArgs { pub targetLimit: *const ::std::os::raw::c_char, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterFromUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterFromUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2550,102 +2098,28 @@ pub struct UConverterToUnicodeArgs { pub targetLimit: *const UChar, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterToUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterToUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2725,39 +2199,39 @@ pub type UConverterFromUCallback = ::std::option::Option< pErrorCode: *mut UErrorCode, ), >; -extern "C" { +unsafe extern "C" { pub fn ucnv_compareNames_71( name1: *const ::std::os::raw::c_char, name2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ucnv_open_71( converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openU_71(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openCCSID_71( codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openPackage_71( packageName: *const ::std::os::raw::c_char, converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_clone_71(cnv: *const UConverter, status: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_safeClone_71( cnv: *const UConverter, stackBuffer: *mut ::std::os::raw::c_void, @@ -2765,10 +2239,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_close_71(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getSubstChars_71( converter: *const UConverter, subChars: *mut ::std::os::raw::c_char, @@ -2776,7 +2250,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstChars_71( converter: *mut UConverter, subChars: *const ::std::os::raw::c_char, @@ -2784,7 +2258,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstString_71( cnv: *mut UConverter, s: *const UChar, @@ -2792,7 +2266,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidChars_71( converter: *const UConverter, errBytes: *mut ::std::os::raw::c_char, @@ -2800,7 +2274,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidUChars_71( converter: *const UConverter, errUChars: *mut UChar, @@ -2808,22 +2282,22 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_reset_71(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetToUnicode_71(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetFromUnicode_71(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMaxCharSize_71(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMinCharSize_71(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDisplayName_71( converter: *const UConverter, displayLocale: *const ::std::os::raw::c_char, @@ -2832,25 +2306,25 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getName_71( converter: *const UConverter, err: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCCSID_71(converter: *const UConverter, err: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getPlatform_71( converter: *const UConverter, err: *mut UErrorCode, ) -> UConverterPlatform; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getType_71(converter: *const UConverter) -> UConverterType; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStarters_71( converter: *const UConverter, starters: *mut UBool, @@ -2864,7 +2338,7 @@ pub enum UConverterUnicodeSet { UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, UCNV_SET_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn ucnv_getUnicodeSet_71( cnv: *const UConverter, setFillIn: *mut USet, @@ -2872,21 +2346,21 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getToUCallBack_71( converter: *const UConverter, action: *mut UConverterToUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getFromUCallBack_71( converter: *const UConverter, action: *mut UConverterFromUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setToUCallBack_71( converter: *mut UConverter, newAction: UConverterToUCallback, @@ -2896,7 +2370,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFromUCallBack_71( converter: *mut UConverter, newAction: UConverterFromUCallback, @@ -2906,7 +2380,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUnicode_71( converter: *mut UConverter, target: *mut *mut ::std::os::raw::c_char, @@ -2918,7 +2392,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUnicode_71( converter: *mut UConverter, target: *mut *mut UChar, @@ -2930,7 +2404,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUChars_71( cnv: *mut UConverter, dest: *mut ::std::os::raw::c_char, @@ -2940,7 +2414,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUChars_71( cnv: *mut UConverter, dest: *mut UChar, @@ -2950,7 +2424,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getNextUChar_71( converter: *mut UConverter, source: *mut *const ::std::os::raw::c_char, @@ -2958,7 +2432,7 @@ extern "C" { err: *mut UErrorCode, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_convertEx_71( targetCnv: *mut UConverter, sourceCnv: *mut UConverter, @@ -2975,7 +2449,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_convert_71( toConverterName: *const ::std::os::raw::c_char, fromConverterName: *const ::std::os::raw::c_char, @@ -2986,7 +2460,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toAlgorithmic_71( algorithmicType: UConverterType, cnv: *mut UConverter, @@ -2997,7 +2471,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromAlgorithmic_71( cnv: *mut UConverter, algorithmicType: UConverterType, @@ -3008,87 +2482,87 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_flushCache_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAvailable_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAvailableName_71(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openAllNames_71(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAliases_71( alias: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAlias_71( alias: *const ::std::os::raw::c_char, n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAliases_71( alias: *const ::std::os::raw::c_char, aliases: *mut *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_openStandardNames_71( convName: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countStandards_71() -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandard_71( n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandardName_71( name: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCanonicalName_71( alias: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDefaultName_71() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setDefaultName_71(name: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fixFileSeparator_71(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); } -extern "C" { +unsafe extern "C" { pub fn ucnv_isAmbiguous_71(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFallback_71(cnv: *mut UConverter, usesFallback: UBool); } -extern "C" { +unsafe extern "C" { pub fn ucnv_usesFallback_71(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_detectUnicodeSignature_71( source: *const ::std::os::raw::c_char, sourceLength: i32, @@ -3096,13 +2570,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUCountPending_71(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUCountPending_71(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_isFixedWidth_71(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; } #[repr(u32)] @@ -3157,181 +2631,42 @@ pub struct UCharIterator { pub getState: UCharIteratorGetState, pub setState: UCharIteratorSetState, } -#[test] -fn bindgen_test_layout_UCharIterator() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UCharIterator)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCharIterator)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedField) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedField) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).move_) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasNext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasPrevious) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasPrevious) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(current) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).previous) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(previous) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedFn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedFn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getState) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setState) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(setState) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; impl Default for UCharIterator { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3361,22 +2696,22 @@ pub enum UNormalizationCheckResult { pub struct UNormalizer2 { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFCInstance_71(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFDInstance_71(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCInstance_71(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKDInstance_71(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCCasefoldInstance_71(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getInstance_71( packageName: *const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char, @@ -3384,17 +2719,17 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_openFiltered_71( norm2: *const UNormalizer2, filterSet: *const USet, pErrorCode: *mut UErrorCode, ) -> *mut UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_close_71(norm2: *mut UNormalizer2); } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalize_71( norm2: *const UNormalizer2, src: *const UChar, @@ -3404,7 +2739,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalizeSecondAndAppend_71( norm2: *const UNormalizer2, first: *mut UChar, @@ -3415,7 +2750,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_append_71( norm2: *const UNormalizer2, first: *mut UChar, @@ -3426,7 +2761,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getDecomposition_71( norm2: *const UNormalizer2, c: UChar32, @@ -3435,7 +2770,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getRawDecomposition_71( norm2: *const UNormalizer2, c: UChar32, @@ -3444,13 +2779,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_composePair_71(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getCombiningClass_71(norm2: *const UNormalizer2, c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isNormalized_71( norm2: *const UNormalizer2, s: *const UChar, @@ -3458,7 +2793,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_quickCheck_71( norm2: *const UNormalizer2, s: *const UChar, @@ -3466,7 +2801,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UNormalizationCheckResult; } -extern "C" { +unsafe extern "C" { pub fn unorm2_spanQuickCheckYes_71( norm2: *const UNormalizer2, s: *const UChar, @@ -3474,13 +2809,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryBefore_71(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryAfter_71(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isInert_71(norm2: *const UNormalizer2, c: UChar32) -> UBool; } impl UNormalizationMode { @@ -3576,13 +2911,13 @@ pub enum UColRuleOption { UCOL_TAILORING_ONLY = 0, UCOL_FULL_RULES = 1, } -extern "C" { +unsafe extern "C" { pub fn ucol_open_71( loc: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openRules_71( rules: *const UChar, rulesLength: i32, @@ -3592,7 +2927,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openFromShortString_71( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3600,14 +2935,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractions_71( coll: *const UCollator, conts: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractionsAndExpansions_71( coll: *const UCollator, contractions: *mut USet, @@ -3616,10 +2951,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_close_71(coll: *mut UCollator); } -extern "C" { +unsafe extern "C" { pub fn ucol_strcoll_71( coll: *const UCollator, source: *const UChar, @@ -3628,7 +2963,7 @@ extern "C" { targetLength: i32, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollUTF8_71( coll: *const UCollator, source: *const ::std::os::raw::c_char, @@ -3638,7 +2973,7 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_greater_71( coll: *const UCollator, source: *const UChar, @@ -3647,7 +2982,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_greaterOrEqual_71( coll: *const UCollator, source: *const UChar, @@ -3656,7 +2991,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_equal_71( coll: *const UCollator, source: *const UChar, @@ -3665,7 +3000,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollIter_71( coll: *const UCollator, sIter: *mut UCharIterator, @@ -3673,13 +3008,13 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_getStrength_71(coll: *const UCollator) -> UCollationStrength; } -extern "C" { +unsafe extern "C" { pub fn ucol_setStrength_71(coll: *mut UCollator, strength: UCollationStrength); } -extern "C" { +unsafe extern "C" { pub fn ucol_getReorderCodes_71( coll: *const UCollator, dest: *mut i32, @@ -3687,7 +3022,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setReorderCodes_71( coll: *mut UCollator, reorderCodes: *const i32, @@ -3695,7 +3030,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getEquivalentReorderCodes_71( reorderCode: i32, dest: *mut i32, @@ -3703,7 +3038,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getDisplayName_71( objLoc: *const ::std::os::raw::c_char, dispLoc: *const ::std::os::raw::c_char, @@ -3712,25 +3047,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getAvailable_71(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_countAvailable_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openAvailableLocales_71(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywords_71(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValues_71( keyword: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValuesForLocale_71( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -3738,7 +3073,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getFunctionalEquivalent_71( result: *mut ::std::os::raw::c_char, resultCapacity: i32, @@ -3748,10 +3083,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRules_71(coll: *const UCollator, length: *mut i32) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ucol_getShortDefinitionString_71( coll: *const UCollator, locale: *const ::std::os::raw::c_char, @@ -3760,7 +3095,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_normalizeShortDefinitionString_71( source: *const ::std::os::raw::c_char, destination: *mut ::std::os::raw::c_char, @@ -3769,7 +3104,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getSortKey_71( coll: *const UCollator, source: *const UChar, @@ -3778,7 +3113,7 @@ extern "C" { resultLength: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_nextSortKeyPart_71( coll: *const UCollator, iter: *mut UCharIterator, @@ -3796,7 +3131,7 @@ pub enum UColBoundMode { UCOL_BOUND_UPPER_LONG = 2, UCOL_BOUND_VALUE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn ucol_getBound_71( source: *const u8, sourceLength: i32, @@ -3807,13 +3142,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVersion_71(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_getUCAVersion_71(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_mergeSortkeys_71( src1: *const u8, src1Length: i32, @@ -3823,7 +3158,7 @@ extern "C" { destCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setAttribute_71( coll: *mut UCollator, attr: UColAttribute, @@ -3831,24 +3166,24 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getAttribute_71( coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode, ) -> UColAttributeValue; } -extern "C" { +unsafe extern "C" { pub fn ucol_setMaxVariable_71( coll: *mut UCollator, group: UColReorderCode, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getMaxVariable_71(coll: *const UCollator) -> UColReorderCode; } -extern "C" { +unsafe extern "C" { pub fn ucol_setVariableTop_71( coll: *mut UCollator, varTop: *const UChar, @@ -3856,16 +3191,16 @@ extern "C" { status: *mut UErrorCode, ) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVariableTop_71(coll: *const UCollator, status: *mut UErrorCode) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_restoreVariableTop_71(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucol_clone_71(coll: *const UCollator, status: *mut UErrorCode) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_safeClone_71( coll: *const UCollator, stackBuffer: *mut ::std::os::raw::c_void, @@ -3873,7 +3208,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRulesEx_71( coll: *const UCollator, delta: UColRuleOption, @@ -3881,31 +3216,31 @@ extern "C" { bufferLen: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocale_71( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocaleByType_71( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getTailoredSet_71(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn ucol_getUnsafeSet_71( coll: *const UCollator, unsafe_: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_prepareShortStringOpen_71( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3913,7 +3248,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_cloneBinary_71( coll: *const UCollator, buffer: *mut u8, @@ -3921,7 +3256,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openBinary_71( bin: *const u8, length: i32, @@ -3939,13 +3274,13 @@ pub struct UCharsetDetector { pub struct UCharsetMatch { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ucsdet_open_71(status: *mut UErrorCode) -> *mut UCharsetDetector; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_close_71(ucsd: *mut UCharsetDetector); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setText_71( ucsd: *mut UCharsetDetector, textIn: *const ::std::os::raw::c_char, @@ -3953,7 +3288,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDeclaredEncoding_71( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3961,35 +3296,35 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detect_71( ucsd: *mut UCharsetDetector, status: *mut UErrorCode, ) -> *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detectAll_71( ucsd: *mut UCharsetDetector, matchesFound: *mut i32, status: *mut UErrorCode, ) -> *mut *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getName_71( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getConfidence_71(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getLanguage_71( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getUChars_71( ucsm: *const UCharsetMatch, buf: *mut UChar, @@ -3997,25 +3332,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getAllDetectableCharsets_71( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_isInputFilterEnabled_71(ucsd: *const UCharsetDetector) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_enableInputFilter_71(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getDetectableCharsets_71( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDetectableCharset_71( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -4030,51 +3365,17 @@ pub struct UFieldPosition { pub beginIndex: i32, pub endIndex: i32, } -#[test] -fn bindgen_test_layout_UFieldPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(UFieldPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UFieldPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(field) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).beginIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(beginIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).endIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(endIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UFormattableType { @@ -4088,54 +3389,54 @@ pub enum UFormattableType { UFMT_COUNT = 7, } pub type UFormattable = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn ufmt_open_71(status: *mut UErrorCode) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_close_71(fmt: *mut UFormattable); } -extern "C" { +unsafe extern "C" { pub fn ufmt_getType_71(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; } -extern "C" { +unsafe extern "C" { pub fn ufmt_isNumeric_71(fmt: *const UFormattable) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDate_71(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDouble_71(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getLong_71(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getInt64_71(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getObject_71( fmt: *const UFormattable, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getUChars_71( fmt: *mut UFormattable, len: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayLength_71(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayItemByIndex_71( fmt: *mut UFormattable, n: i32, status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDecNumChars_71( fmt: *mut UFormattable, len: *mut i32, @@ -4170,13 +3471,13 @@ pub enum UDisplayContext { pub struct UFieldPositionIterator { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_open_71(status: *mut UErrorCode) -> *mut UFieldPositionIterator; } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_close_71(fpositer: *mut UFieldPositionIterator); } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_next_71( fpositer: *mut UFieldPositionIterator, beginIndex: *mut i32, @@ -4212,7 +3513,7 @@ pub enum UNumberFormatStyle { UNUM_CURRENCY_STANDARD = 16, UNUM_FORMAT_STYLE_COUNT = 17, } -extern "C" { +unsafe extern "C" { pub fn unum_open_71( style: UNumberFormatStyle, pattern: *const UChar, @@ -4222,13 +3523,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_close_71(fmt: *mut UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn unum_clone_71(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_format_71( fmt: *const UNumberFormat, number: i32, @@ -4238,7 +3539,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatInt64_71( fmt: *const UNumberFormat, number: i64, @@ -4248,7 +3549,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDouble_71( fmt: *const UNumberFormat, number: f64, @@ -4258,7 +3559,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleForFields_71( format: *const UNumberFormat, number: f64, @@ -4268,7 +3569,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDecimal_71( fmt: *const UNumberFormat, number: *const ::std::os::raw::c_char, @@ -4279,7 +3580,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleCurrency_71( fmt: *const UNumberFormat, number: f64, @@ -4290,7 +3591,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatUFormattable_71( fmt: *const UNumberFormat, number: *const UFormattable, @@ -4300,7 +3601,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parse_71( fmt: *const UNumberFormat, text: *const UChar, @@ -4309,7 +3610,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseInt64_71( fmt: *const UNumberFormat, text: *const UChar, @@ -4318,7 +3619,7 @@ extern "C" { status: *mut UErrorCode, ) -> i64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDouble_71( fmt: *const UNumberFormat, text: *const UChar, @@ -4327,7 +3628,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDecimal_71( fmt: *const UNumberFormat, text: *const UChar, @@ -4338,7 +3639,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDoubleCurrency_71( fmt: *const UNumberFormat, text: *const UChar, @@ -4348,7 +3649,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseToUFormattable_71( fmt: *const UNumberFormat, result: *mut UFormattable, @@ -4358,7 +3659,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn unum_applyPattern_71( format: *mut UNumberFormat, localized: UBool, @@ -4368,10 +3669,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getAvailable_71(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_countAvailable_71() -> i32; } #[repr(u32)] @@ -4409,23 +3710,23 @@ pub enum UNumberFormatAttribute { UNUM_SIGN_ALWAYS_SHOWN = 4100, UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 4101, } -extern "C" { +unsafe extern "C" { pub fn unum_getAttribute_71(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setAttribute_71( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, newValue: i32, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getDoubleAttribute_71( fmt: *const UNumberFormat, attr: UNumberFormatAttribute, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_setDoubleAttribute_71( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, @@ -4444,7 +3745,7 @@ pub enum UNumberFormatTextAttribute { UNUM_DEFAULT_RULESET = 6, UNUM_PUBLIC_RULESETS = 7, } -extern "C" { +unsafe extern "C" { pub fn unum_getTextAttribute_71( fmt: *const UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4453,7 +3754,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setTextAttribute_71( fmt: *mut UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4462,7 +3763,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_toPattern_71( fmt: *const UNumberFormat, isPatternLocalized: UBool, @@ -4505,7 +3806,7 @@ pub enum UNumberFormatSymbol { UNUM_APPROXIMATELY_SIGN_SYMBOL = 28, UNUM_FORMAT_SYMBOL_COUNT = 29, } -extern "C" { +unsafe extern "C" { pub fn unum_getSymbol_71( fmt: *const UNumberFormat, symbol: UNumberFormatSymbol, @@ -4514,7 +3815,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setSymbol_71( fmt: *mut UNumberFormat, symbol: UNumberFormatSymbol, @@ -4523,21 +3824,21 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getLocaleByType_71( fmt: *const UNumberFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_setContext_71( fmt: *mut UNumberFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getContext_71( fmt: *const UNumberFormat, type_: UDisplayContextType, @@ -4611,10 +3912,10 @@ pub enum UDateFormatField { UDAT_TIME_SEPARATOR_FIELD = 37, UDAT_FIELD_COUNT = 38, } -extern "C" { +unsafe extern "C" { pub fn udat_toCalendarDateField_71(field: UDateFormatField) -> UCalendarDateFields; } -extern "C" { +unsafe extern "C" { pub fn udat_open_71( timeStyle: UDateFormatStyle, dateStyle: UDateFormatStyle, @@ -4626,7 +3927,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_close_71(format: *mut UDateFormat); } #[repr(u32)] @@ -4638,14 +3939,14 @@ pub enum UDateFormatBooleanAttribute { UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udat_getBooleanAttribute_71( fmt: *const UDateFormat, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setBooleanAttribute_71( fmt: *mut UDateFormat, attr: UDateFormatBooleanAttribute, @@ -4661,10 +3962,10 @@ pub enum UDateFormatHourCycle { UDAT_HOUR_CYCLE_23 = 2, UDAT_HOUR_CYCLE_24 = 3, } -extern "C" { +unsafe extern "C" { pub fn udat_clone_71(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_format_71( format: *const UDateFormat, dateToFormat: UDate, @@ -4674,7 +3975,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendar_71( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4684,7 +3985,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatForFields_71( format: *const UDateFormat, dateToFormat: UDate, @@ -4694,7 +3995,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendarForFields_71( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4704,7 +4005,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_parse_71( format: *const UDateFormat, text: *const UChar, @@ -4713,7 +4014,7 @@ extern "C" { status: *mut UErrorCode, ) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_parseCalendar_71( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4723,28 +4024,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_isLenient_71(fmt: *const UDateFormat) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setLenient_71(fmt: *mut UDateFormat, isLenient: UBool); } -extern "C" { +unsafe extern "C" { pub fn udat_getCalendar_71(fmt: *const UDateFormat) -> *const UCalendar; } -extern "C" { +unsafe extern "C" { pub fn udat_setCalendar_71(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormat_71(fmt: *const UDateFormat) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormatForField_71( fmt: *const UDateFormat, field: UChar, ) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormatForFields_71( fmt: *mut UDateFormat, fields: *const UChar, @@ -4752,28 +4053,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_setNumberFormat_71(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormat_71( fmt: *mut UDateFormat, numberFormatToAdopt: *mut UNumberFormat, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getAvailable_71(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_countAvailable_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_get2DigitYearStart_71(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_set2DigitYearStart_71(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_toPattern_71( fmt: *const UDateFormat, localized: UBool, @@ -4782,7 +4083,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPattern_71( format: *mut UDateFormat, localized: UBool, @@ -4829,7 +4130,7 @@ pub enum UDateFormatSymbolType { pub struct UDateFormatSymbols { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn udat_getSymbols_71( fmt: *const UDateFormat, type_: UDateFormatSymbolType, @@ -4839,10 +4140,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_countSymbols_71(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_setSymbols_71( format: *mut UDateFormat, type_: UDateFormatSymbolType, @@ -4852,28 +4153,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getLocaleByType_71( fmt: *const UDateFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_setContext_71( fmt: *mut UDateFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getContext_71( fmt: *const UDateFormat, type_: UDisplayContextType, status: *mut UErrorCode, ) -> UDisplayContext; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeDate_71( fmt: *const UDateFormat, result: *mut UChar, @@ -4881,7 +4182,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeTime_71( fmt: *const UDateFormat, result: *mut UChar, @@ -4889,7 +4190,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPatternRelative_71( format: *mut UDateFormat, datePattern: *const UChar, @@ -4911,10 +4212,10 @@ pub type UDateFormatOpener = ::std::option::Option< status: *mut UErrorCode, ) -> *mut UDateFormat, >; -extern "C" { +unsafe extern "C" { pub fn udat_registerOpener_71(opener: UDateFormatOpener, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_unregisterOpener_71( opener: UDateFormatOpener, status: *mut UErrorCode, @@ -4966,25 +4267,25 @@ pub enum UDateTimePatternConflict { UDATPG_CONFLICT = 2, UDATPG_CONFLICT_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn udatpg_open_71( locale: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openEmpty_71(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_close_71(dtpg: *mut UDateTimePatternGenerator); } -extern "C" { +unsafe extern "C" { pub fn udatpg_clone_71( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPattern_71( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -4994,7 +4295,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPatternWithOptions_71( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -5005,7 +4306,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getSkeleton_71( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5015,7 +4316,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBaseSkeleton_71( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5025,7 +4326,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_addPattern_71( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5037,7 +4338,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UDateTimePatternConflict; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemFormat_71( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5045,14 +4346,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemFormat_71( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemName_71( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5060,14 +4361,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemName_71( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getFieldDisplayName_71( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5077,20 +4378,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormat_71( dtpg: *const UDateTimePatternGenerator, dtFormat: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormat_71( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormatForStyle_71( udtpg: *mut UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5099,7 +4400,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormatForStyle_71( udtpg: *const UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5107,20 +4408,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDecimal_71( dtpg: *mut UDateTimePatternGenerator, decimal: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDecimal_71( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypes_71( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5132,7 +4433,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypesWithOptions_71( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5145,19 +4446,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openSkeletons_71( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openBaseSkeletons_71( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getPatternForSkeleton_71( dtpg: *const UDateTimePatternGenerator, skeleton: *const UChar, @@ -5165,7 +4466,7 @@ extern "C" { pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDefaultHourCycle_71( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, @@ -5184,111 +4485,28 @@ pub struct UDataInfo { pub formatVersion: [u8; 4usize], pub dataVersion: [u8; 4usize], } -#[test] -fn bindgen_test_layout_UDataInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(UDataInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(UDataInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedWord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isBigEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(isBigEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charsetFamily) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(charsetFamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeofUChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(sizeofUChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedByte) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedByte) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataFormat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataFormat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formatVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(formatVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UDataMemory { @@ -5302,7 +4520,7 @@ pub type UDataMemoryIsAcceptable = ::std::option::Option< pInfo: *const UDataInfo, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn udata_open_71( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5310,7 +4528,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_openChoice_71( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5320,19 +4538,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_close_71(pData: *mut UDataMemory); } -extern "C" { +unsafe extern "C" { pub fn udata_getMemory_71(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn udata_getInfo_71(pData: *mut UDataMemory, pInfo: *mut UDataInfo); } -extern "C" { +unsafe extern "C" { pub fn udata_setCommonData_71(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udata_setAppData_71( packageName: *const ::std::os::raw::c_char, data: *const ::std::os::raw::c_void, @@ -5351,7 +4569,7 @@ pub enum UDataFileAccess { UDATA_NO_FILES = 3, UDATA_FILE_ACCESS_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udata_setFileAccess_71(access: UDataFileAccess, status: *mut UErrorCode); } #[repr(u32)] @@ -5403,13 +4621,13 @@ pub enum UListFormatterWidth { ULISTFMT_WIDTH_SHORT = 1, ULISTFMT_WIDTH_NARROW = 2, } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_open_71( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openForType_71( locale: *const ::std::os::raw::c_char, type_: UListFormatterType, @@ -5417,22 +4635,22 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_close_71(listfmt: *mut UListFormatter); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openResult_71(ec: *mut UErrorCode) -> *mut UFormattedList; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_resultAsValue_71( uresult: *const UFormattedList, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_closeResult_71(uresult: *mut UFormattedList); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_format_71( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5443,7 +4661,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_formatStringsToResult_71( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5454,7 +4672,7 @@ extern "C" { ); } pub type va_list = __builtin_va_list; -extern "C" { +unsafe extern "C" { pub fn u_formatMessage_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5465,7 +4683,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessage_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5476,7 +4694,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessage_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5487,7 +4705,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessage_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5498,7 +4716,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_formatMessageWithError_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5510,7 +4728,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessageWithError_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5522,7 +4740,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessageWithError_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5534,7 +4752,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessageWithError_71( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5547,7 +4765,7 @@ extern "C" { ); } pub type UMessageFormat = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn umsg_open_71( pattern: *const UChar, patternLength: i32, @@ -5556,19 +4774,19 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_close_71(format: *mut UMessageFormat); } -extern "C" { +unsafe extern "C" { pub fn umsg_clone_71(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_setLocale_71(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn umsg_getLocale_71(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn umsg_applyPattern_71( fmt: *mut UMessageFormat, pattern: *const UChar, @@ -5577,7 +4795,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_toPattern_71( fmt: *const UMessageFormat, result: *mut UChar, @@ -5585,7 +4803,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_format_71( fmt: *const UMessageFormat, result: *mut UChar, @@ -5594,7 +4812,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_vformat_71( fmt: *const UMessageFormat, result: *mut UChar, @@ -5603,7 +4821,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_parse_71( fmt: *const UMessageFormat, source: *const UChar, @@ -5613,7 +4831,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn umsg_vparse_71( fmt: *const UMessageFormat, source: *const UChar, @@ -5623,7 +4841,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_autoQuoteApostrophe_71( pattern: *const UChar, patternLength: i32, @@ -5642,7 +4860,7 @@ pub struct UNumberFormatter { pub struct UFormattedNumber { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocale_71( skeleton: *const UChar, skeletonLen: i32, @@ -5650,7 +4868,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocaleWithError_71( skeleton: *const UChar, skeletonLen: i32, @@ -5659,10 +4877,10 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openResult_71(ec: *mut UErrorCode) -> *mut UFormattedNumber; } -extern "C" { +unsafe extern "C" { pub fn unumf_formatInt_71( uformatter: *const UNumberFormatter, value: i64, @@ -5670,7 +4888,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDouble_71( uformatter: *const UNumberFormatter, value: f64, @@ -5678,7 +4896,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDecimal_71( uformatter: *const UNumberFormatter, value: *const ::std::os::raw::c_char, @@ -5687,13 +4905,13 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultAsValue_71( uresult: *const UFormattedNumber, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToString_71( uresult: *const UFormattedNumber, buffer: *mut UChar, @@ -5701,21 +4919,21 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultNextFieldPosition_71( uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultGetAllFieldPositions_71( uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToDecimalNumber_71( uresult: *const UFormattedNumber, dest: *mut ::std::os::raw::c_char, @@ -5723,10 +4941,10 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_close_71(uformatter: *mut UNumberFormatter); } -extern "C" { +unsafe extern "C" { pub fn unumf_closeResult_71(uresult: *mut UFormattedNumber); } #[repr(C)] @@ -5746,23 +4964,23 @@ pub enum UPluralType { pub struct UPluralRules { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uplrules_open_71( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_openForType_71( locale: *const ::std::os::raw::c_char, type_: UPluralType, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_close_71(uplrules: *mut UPluralRules); } -extern "C" { +unsafe extern "C" { pub fn uplrules_select_71( uplrules: *const UPluralRules, number: f64, @@ -5771,7 +4989,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectFormatted_71( uplrules: *const UPluralRules, number: *const UFormattedNumber, @@ -5780,7 +4998,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectForRange_71( uplrules: *const UPluralRules, urange: *const UFormattedNumberRange, @@ -5789,7 +5007,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectWithFormat_71( uplrules: *const UPluralRules, number: f64, @@ -5799,53 +5017,53 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_getKeywords_71( uplrules: *const UPluralRules, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn u_getDataDirectory_71() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setDataDirectory_71(directory: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_71(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_71( path: *const ::std::os::raw::c_char, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_charsToUChars_71(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_UCharsToChars_71(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_strlen_71(s: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_countChar32_71(s: *const UChar, length: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strHasMoreChar32Than_71(s: *const UChar, length: i32, number: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_strcat_71(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncat_71(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strstr_71(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindFirst_71( s: *const UChar, length: i32, @@ -5853,16 +5071,16 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr_71(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr32_71(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrstr_71(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindLast_71( s: *const UChar, length: i32, @@ -5870,35 +5088,35 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr_71(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr32_71(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strpbrk_71(string: *const UChar, matchSet: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcspn_71(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strspn_71(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strtok_r_71( src: *mut UChar, delim: *const UChar, saveState: *mut *mut UChar, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcmp_71(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcmpCodePointOrder_71(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompare_71( s1: *const UChar, length1: i32, @@ -5907,14 +5125,14 @@ extern "C" { codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompareIter_71( iter1: *mut UCharIterator, iter2: *mut UCharIterator, codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCaseCompare_71( s1: *const UChar, length1: i32, @@ -5924,78 +5142,78 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmp_71(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmpCodePointOrder_71(s1: *const UChar, s2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcasecmp_71(s1: *const UChar, s2: *const UChar, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncasecmp_71(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcasecmp_71(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcpy_71(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncpy_71(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrcpy_71(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrncpy_71( dst: *mut UChar, src: *const ::std::os::raw::c_char, n: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_austrcpy_71( dst: *mut ::std::os::raw::c_char, src: *const UChar, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_austrncpy_71( dst: *mut ::std::os::raw::c_char, src: *const UChar, n: i32, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_memcpy_71(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memmove_71(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memset_71(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memcmp_71(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcmpCodePointOrder_71(s1: *const UChar, s2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memchr_71(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memchr32_71(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr_71(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr32_71(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_unescape_71( src: *const ::std::os::raw::c_char, dest: *mut UChar, @@ -6005,7 +5223,7 @@ extern "C" { pub type UNESCAPE_CHAR_AT = ::std::option::Option< unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, >; -extern "C" { +unsafe extern "C" { pub fn u_unescapeAt_71( charAt: UNESCAPE_CHAR_AT, offset: *mut i32, @@ -6013,7 +5231,7 @@ extern "C" { context: *mut ::std::os::raw::c_void, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strToUpper_71( dest: *mut UChar, destCapacity: i32, @@ -6023,7 +5241,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToLower_71( dest: *mut UChar, destCapacity: i32, @@ -6033,7 +5251,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToTitle_71( dest: *mut UChar, destCapacity: i32, @@ -6044,7 +5262,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strFoldCase_71( dest: *mut UChar, destCapacity: i32, @@ -6054,7 +5272,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToWCS_71( dest: *mut wchar_t, destCapacity: i32, @@ -6064,7 +5282,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut wchar_t; } -extern "C" { +unsafe extern "C" { pub fn u_strFromWCS_71( dest: *mut UChar, destCapacity: i32, @@ -6074,7 +5292,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8_71( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6084,7 +5302,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8_71( dest: *mut UChar, destCapacity: i32, @@ -6094,7 +5312,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8WithSub_71( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6106,7 +5324,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8WithSub_71( dest: *mut UChar, destCapacity: i32, @@ -6118,7 +5336,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8Lenient_71( dest: *mut UChar, destCapacity: i32, @@ -6128,7 +5346,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32_71( dest: *mut UChar32, destCapacity: i32, @@ -6138,7 +5356,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32_71( dest: *mut UChar, destCapacity: i32, @@ -6148,7 +5366,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32WithSub_71( dest: *mut UChar32, destCapacity: i32, @@ -6160,7 +5378,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32WithSub_71( dest: *mut UChar, destCapacity: i32, @@ -6172,7 +5390,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToJavaModifiedUTF8_71( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6182,7 +5400,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromJavaModifiedUTF8WithSub_71( dest: *mut UChar, destCapacity: i32, @@ -6220,82 +5438,24 @@ pub struct UReplaceableCallbacks { unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), >, } -#[test] -fn bindgen_test_layout_UReplaceableCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charAt) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(charAt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).char32At) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(char32At) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(copy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; pub type UTransliterator = *mut ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] @@ -6311,62 +5471,20 @@ pub struct UTransPosition { pub start: i32, pub limit: i32, } -#[test] -fn bindgen_test_layout_UTransPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(UTransPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UTransPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextLimit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(limit) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { pub fn utrans_openU_71( id: *const UChar, idLength: i32, @@ -6377,34 +5495,34 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_openInverse_71( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_clone_71( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_close_71(trans: *mut UTransliterator); } -extern "C" { +unsafe extern "C" { pub fn utrans_getUnicodeID_71( trans: *const UTransliterator, resultLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn utrans_register_71(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn utrans_unregisterID_71(id: *const UChar, idLength: i32); } -extern "C" { +unsafe extern "C" { pub fn utrans_setFilter_71( trans: *mut UTransliterator, filterPattern: *const UChar, @@ -6412,13 +5530,13 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_countAvailableIDs_71() -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_openIDs_71(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn utrans_trans_71( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6428,7 +5546,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncremental_71( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6437,7 +5555,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transUChars_71( trans: *const UTransliterator, text: *mut UChar, @@ -6448,7 +5566,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncrementalUChars_71( trans: *const UTransliterator, text: *mut UChar, @@ -6458,7 +5576,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_toRules_71( trans: *const UTransliterator, escapeUnprintable: UBool, @@ -6467,7 +5585,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_getSourceSet_71( trans: *const UTransliterator, ignoreFilter: UBool, @@ -6475,7 +5593,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn utrans_open_71( id: *const ::std::os::raw::c_char, dir: UTransDirection, @@ -6485,17 +5603,17 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_getID_71( trans: *const UTransliterator, buf: *mut ::std::os::raw::c_char, bufCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_unregister_71(id: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn utrans_getAvailableID_71( index: i32, buf: *mut ::std::os::raw::c_char, @@ -6510,61 +5628,15 @@ pub union UCPTrieData { pub ptr32: *const u32, pub ptr8: *const u8, } -#[test] -fn bindgen_test_layout_UCPTrieData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(UCPTrieData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrieData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr16) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr8) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; impl Default for UCPTrieData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6591,151 +5663,28 @@ pub struct UCPTrie { pub dataNullOffset: i32, pub nullValue: u32, } -#[test] -fn bindgen_test_layout_UCPTrie() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UCPTrie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrie)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).indexLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(indexLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).highStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(highStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shifted12HighStart) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(shifted12HighStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valueWidth) as usize - ptr as usize }, - 31usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(valueWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved32) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index3NullOffset) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index3NullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataNullOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataNullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nullValue) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(nullValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; impl Default for UCPTrie { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6760,7 +5709,7 @@ pub enum UCPTrieValueWidth { UCPTRIE_VALUE_BITS_32 = 1, UCPTRIE_VALUE_BITS_8 = 2, } -extern "C" { +unsafe extern "C" { pub fn ucptrie_openFromBinary_71( type_: UCPTrieType, valueWidth: UCPTrieValueWidth, @@ -6770,19 +5719,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UCPTrie; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_close_71(trie: *mut UCPTrie); } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getType_71(trie: *const UCPTrie) -> UCPTrieType; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getValueWidth_71(trie: *const UCPTrie) -> UCPTrieValueWidth; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_get_71(trie: *const UCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getRange_71( trie: *const UCPTrie, start: UChar32, @@ -6793,7 +5742,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_toBinary_71( trie: *const UCPTrie, data: *mut ::std::os::raw::c_void, @@ -6801,13 +5750,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallIndex_71(trie: *const UCPTrie, c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallU8Index_71(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalU8PrevIndex_71( trie: *const UCPTrie, c: UChar32, @@ -6820,38 +5769,38 @@ extern "C" { pub struct UMutableCPTrie { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_open_71( initialValue: u32, errorValue: u32, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_clone_71( other: *const UMutableCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_close_71(trie: *mut UMutableCPTrie); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPMap_71( map: *const UCPMap, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPTrie_71( trie: *const UCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_get_71(trie: *const UMutableCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_getRange_71( trie: *const UMutableCPTrie, start: UChar32, @@ -6862,7 +5811,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_set_71( trie: *mut UMutableCPTrie, c: UChar32, @@ -6870,7 +5819,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_setRange_71( trie: *mut UMutableCPTrie, start: UChar32, @@ -6879,7 +5828,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_buildImmutable_71( trie: *mut UMutableCPTrie, type_: UCPTrieType, @@ -6896,61 +5845,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); diff --git a/rust_icu_sys/bindgen/lib_72.rs b/rust_icu_sys/bindgen/lib_72.rs index 7946706..733f505 100644 --- a/rust_icu_sys/bindgen/lib_72.rs +++ b/rust_icu_sys/bindgen/lib_72.rs @@ -1,23 +1,26 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type UBool = i8; pub type UChar = u16; pub type UChar32 = i32; pub type UVersionInfo = [u8; 4usize]; -extern "C" { +unsafe extern "C" { pub fn u_versionFromString_72( versionArray: *mut u8, versionString: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn u_versionFromUString_72(versionArray: *mut u8, versionString: *const UChar); } -extern "C" { - pub fn u_versionToString_72(versionArray: *mut u8, versionString: *mut ::std::os::raw::c_char); +unsafe extern "C" { + pub fn u_versionToString_72( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); } -extern "C" { +unsafe extern "C" { pub fn u_getVersion_72(versionArray: *mut u8); } pub type UDate = f64; @@ -212,7 +215,7 @@ pub enum UErrorCode { U_PLUGIN_DIDNT_SET_LEVEL = 66817, U_PLUGIN_ERROR_LIMIT = 66818, } -extern "C" { +unsafe extern "C" { pub fn u_errorName_72(code: UErrorCode) -> *const ::std::os::raw::c_char; } #[repr(C)] @@ -220,37 +223,37 @@ extern "C" { pub struct UEnumeration { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uenum_close_72(en: *mut UEnumeration); } -extern "C" { +unsafe extern "C" { pub fn uenum_count_72(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uenum_unext_72( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn uenum_next_72( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uenum_reset_72(en: *mut UEnumeration, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uenum_openUCharStringsEnumeration_72( strings: *const *const UChar, count: i32, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uenum_openCharStringsEnumeration_72( strings: *const *const ::std::os::raw::c_char, count: i32, @@ -265,13 +268,13 @@ pub enum ULocDataLocaleType { ULOC_REQUESTED_LOCALE = 2, ULOC_DATA_LOCALE_TYPE_LIMIT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_getDefault_72() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_setDefault_72(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uloc_getLanguage_72( localeID: *const ::std::os::raw::c_char, language: *mut ::std::os::raw::c_char, @@ -279,7 +282,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getScript_72( localeID: *const ::std::os::raw::c_char, script: *mut ::std::os::raw::c_char, @@ -287,7 +290,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getCountry_72( localeID: *const ::std::os::raw::c_char, country: *mut ::std::os::raw::c_char, @@ -295,7 +298,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getVariant_72( localeID: *const ::std::os::raw::c_char, variant: *mut ::std::os::raw::c_char, @@ -303,7 +306,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getName_72( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -311,7 +314,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_canonicalize_72( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -319,20 +322,20 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Language_72( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Country_72( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLCID_72(localeID: *const ::std::os::raw::c_char) -> u32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayLanguage_72( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -341,7 +344,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayScript_72( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -350,7 +353,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayCountry_72( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -359,7 +362,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayVariant_72( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -368,7 +371,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeyword_72( keyword: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -377,7 +380,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeywordValue_72( locale: *const ::std::os::raw::c_char, keyword: *const ::std::os::raw::c_char, @@ -387,7 +390,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayName_72( localeID: *const ::std::os::raw::c_char, inLocaleID: *const ::std::os::raw::c_char, @@ -396,10 +399,10 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getAvailable_72(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_countAvailable_72() -> i32; } #[repr(u32)] @@ -410,19 +413,19 @@ pub enum ULocAvailableType { ULOC_AVAILABLE_WITH_LEGACY_ALIASES = 2, ULOC_AVAILABLE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_openAvailableByType_72( type_: ULocAvailableType, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOLanguages_72() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOCountries_72() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getParent_72( localeID: *const ::std::os::raw::c_char, parent: *mut ::std::os::raw::c_char, @@ -430,7 +433,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getBaseName_72( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -438,13 +441,13 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_openKeywords_72( localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getKeywordValue_72( localeID: *const ::std::os::raw::c_char, keywordName: *const ::std::os::raw::c_char, @@ -453,7 +456,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_setKeywordValue_72( keywordName: *const ::std::os::raw::c_char, keywordValue: *const ::std::os::raw::c_char, @@ -462,7 +465,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_isRightToLeft_72(locale: *const ::std::os::raw::c_char) -> UBool; } #[repr(u32)] @@ -474,13 +477,13 @@ pub enum ULayoutType { ULOC_LAYOUT_BTT = 3, ULOC_LAYOUT_UNKNOWN = 4, } -extern "C" { +unsafe extern "C" { pub fn uloc_getCharacterOrientation_72( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> ULayoutType; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLineOrientation_72( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, @@ -493,7 +496,7 @@ pub enum UAcceptResult { ULOC_ACCEPT_VALID = 1, ULOC_ACCEPT_FALLBACK = 2, } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguageFromHTTP_72( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -503,7 +506,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguage_72( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -514,7 +517,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLocaleForLCID_72( hostID: u32, locale: *mut ::std::os::raw::c_char, @@ -522,7 +525,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_addLikelySubtags_72( localeID: *const ::std::os::raw::c_char, maximizedLocaleID: *mut ::std::os::raw::c_char, @@ -530,7 +533,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_minimizeSubtags_72( localeID: *const ::std::os::raw::c_char, minimizedLocaleID: *mut ::std::os::raw::c_char, @@ -538,7 +541,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_forLanguageTag_72( langtag: *const ::std::os::raw::c_char, localeID: *mut ::std::os::raw::c_char, @@ -547,7 +550,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLanguageTag_72( localeID: *const ::std::os::raw::c_char, langtag: *mut ::std::os::raw::c_char, @@ -556,23 +559,23 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleKey_72( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleType_72( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyKey_72( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyType_72( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, @@ -590,13 +593,13 @@ pub enum UCPMapRangeOption { UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, } -extern "C" { +unsafe extern "C" { pub fn ucpmap_get_72(map: *const UCPMap, c: UChar32) -> u32; } pub type UCPMapValueFilter = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, >; -extern "C" { +unsafe extern "C" { pub fn ucpmap_getRange_72( map: *const UCPMap, start: UChar32, @@ -837,115 +840,115 @@ pub enum UPropertyNameChoice { U_LONG_PROPERTY_NAME = 1, U_PROPERTY_NAME_CHOICE_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn u_hasBinaryProperty_72(c: UChar32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_stringHasBinaryProperty_72(s: *const UChar, length: i32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getBinaryPropertySet_72( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const USet; } -extern "C" { +unsafe extern "C" { pub fn u_isUAlphabetic_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isULowercase_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUUppercase_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUWhiteSpace_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyValue_72(c: UChar32, which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMinValue_72(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMaxValue_72(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMap_72( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const UCPMap; } -extern "C" { +unsafe extern "C" { pub fn u_getNumericValue_72(c: UChar32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn u_islower_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isupper_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_istitle_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdigit_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalpha_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalnum_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isxdigit_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_ispunct_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isgraph_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isblank_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdefined_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isspace_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaSpaceChar_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isWhitespace_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_iscntrl_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isISOControl_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isprint_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isbase_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charDirection_72(c: UChar32) -> UCharDirection; } -extern "C" { +unsafe extern "C" { pub fn u_isMirrored_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charMirror_72(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_getBidiPairedBracket_72(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charType_72(c: UChar32) -> i8; } pub type UCharEnumTypeRange = ::std::option::Option< @@ -956,19 +959,19 @@ pub type UCharEnumTypeRange = ::std::option::Option< type_: UCharCategory, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharTypes_72( enumRange: UCharEnumTypeRange, context: *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn u_getCombiningClass_72(c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn u_charDigitValue_72(c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charName_72( code: UChar32, nameChoice: UCharNameChoice, @@ -977,7 +980,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getISOComment_72( c: UChar32, dest: *mut ::std::os::raw::c_char, @@ -985,7 +988,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charFromName_72( nameChoice: UCharNameChoice, name: *const ::std::os::raw::c_char, @@ -1001,7 +1004,7 @@ pub type UEnumCharNamesFn = ::std::option::Option< length: i32, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharNames_72( start: UChar32, limit: UChar32, @@ -1011,68 +1014,68 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyName_72( property: UProperty, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyEnum_72(alias: *const ::std::os::raw::c_char) -> UProperty; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueName_72( property: UProperty, value: i32, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueEnum_72( property: UProperty, alias: *const ::std::os::raw::c_char, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_isIDStart_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDPart_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDIgnorable_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDStart_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDPart_72(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_tolower_72(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_toupper_72(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_totitle_72(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_foldCase_72(c: UChar32, options: u32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_digit_72(ch: UChar32, radix: i8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_forDigit_72(digit: i32, radix: i8) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charAge_72(c: UChar32, versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getUnicodeVersion_72(versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getFC_NFKC_Closure_72( c: UChar32, dest: *mut UChar, @@ -1080,10 +1083,10 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_close_72(ut: *mut UText) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUTF8_72( ut: *mut UText, s: *const ::std::os::raw::c_char, @@ -1091,7 +1094,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUChars_72( ut: *mut UText, s: *const UChar, @@ -1099,7 +1102,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_clone_72( dest: *mut UText, src: *const UText, @@ -1108,46 +1111,46 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_equals_72(a: *const UText, b: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_nativeLength_72(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_isLengthExpensive_72(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_char32At_72(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_current32_72(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32_72(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32_72(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32From_72(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32From_72(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_getNativeIndex_72(ut: *const UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_setNativeIndex_72(ut: *mut UText, nativeIndex: i64); } -extern "C" { +unsafe extern "C" { pub fn utext_moveIndex32_72(ut: *mut UText, delta: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_getPreviousNativeIndex_72(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_extract_72( ut: *mut UText, nativeStart: i64, @@ -1157,13 +1160,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_isWritable_72(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_hasMetaData_72(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_replace_72( ut: *mut UText, nativeStart: i64, @@ -1173,7 +1176,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_copy_72( ut: *mut UText, nativeStart: i64, @@ -1183,7 +1186,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utext_freeze_72(ut: *mut UText); } pub type UTextClone = ::std::option::Option< @@ -1253,181 +1256,34 @@ pub struct UTextFuncs { pub spare2: UTextClose, pub spare3: UTextClose, } -#[test] -fn bindgen_test_layout_UTextFuncs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UTextFuncs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UTextFuncs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(tableSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(clone) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(nativeLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(access) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(copy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapOffsetToNative) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapOffsetToNative) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapNativeIndexToUTF16) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapNativeIndexToUTF16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare3) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare3) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] pub struct UText { @@ -1456,231 +1312,40 @@ pub struct UText { pub privB: i32, pub privC: i32, } -#[test] -fn bindgen_test_layout_UText() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(UText)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UText)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).providerProperties) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(providerProperties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeOfStruct) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(sizeOfStruct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(extraSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeIndexingLimit) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(nativeIndexingLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeStart) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkContents) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkContents) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFuncs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pFuncs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pExtra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(p)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(q)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(r)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privP) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(a)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(b)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, - 124usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(c)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privA) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privB) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privC) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privC) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; impl Default for UText { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1690,7 +1355,7 @@ impl Default for UText { } } } -extern "C" { +unsafe extern "C" { pub fn utext_setup_72(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; } #[repr(C)] @@ -1706,61 +1371,17 @@ pub struct UParseError { pub preContext: [UChar; 16usize], pub postContext: [UChar; 16usize], } -#[test] -fn bindgen_test_layout_UParseError() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(UParseError)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UParseError)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(preContext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).postContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(postContext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UBreakIteratorType { @@ -1813,7 +1434,7 @@ pub enum USentenceBreakTag { UBRK_SENTENCE_TERM_LIMIT = 100, UBRK_SENTENCE_SEP_LIMIT = 200, } -extern "C" { +unsafe extern "C" { pub fn ubrk_open_72( type_: UBreakIteratorType, locale: *const ::std::os::raw::c_char, @@ -1822,7 +1443,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openRules_72( rules: *const UChar, rulesLength: i32, @@ -1832,7 +1453,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openBinaryRules_72( binaryRules: *const u8, rulesLength: i32, @@ -1841,7 +1462,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_safeClone_72( bi: *const UBreakIterator, stackBuffer: *mut ::std::os::raw::c_void, @@ -1849,14 +1470,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_clone_72(bi: *const UBreakIterator, status: *mut UErrorCode) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_close_72(bi: *mut UBreakIterator); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setText_72( bi: *mut UBreakIterator, text: *const UChar, @@ -1864,43 +1485,43 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setUText_72(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_current_72(bi: *const UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_next_72(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_previous_72(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_first_72(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_last_72(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_preceding_72(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_following_72(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getAvailable_72(index: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_countAvailable_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_isBoundary_72(bi: *mut UBreakIterator, offset: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatus_72(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatusVec_72( bi: *mut UBreakIterator, fillInVec: *mut i32, @@ -1908,17 +1529,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getLocaleByType_72( bi: *const UBreakIterator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_refreshUText_72(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_getBinaryRules_72( bi: *mut UBreakIterator, binaryRules: *mut u8, @@ -2008,7 +1629,7 @@ pub enum USystemTimeZoneType { UCAL_ZONE_TYPE_CANONICAL = 1, UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZoneIDEnumeration_72( zoneType: USystemTimeZoneType, region: *const ::std::os::raw::c_char, @@ -2016,39 +1637,39 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZones_72(ec: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openCountryTimeZones_72( country: *const ::std::os::raw::c_char, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDefaultTimeZone_72( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setDefaultTimeZone_72(zoneID: *const UChar, ec: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_getHostTimeZone_72( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDSTSavings_72(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getNow_72() -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_open_72( zoneID: *const UChar, len: i32, @@ -2057,13 +1678,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_close_72(cal: *mut UCalendar); } -extern "C" { +unsafe extern "C" { pub fn ucal_clone_72(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_setTimeZone_72( cal: *mut UCalendar, zoneID: *const UChar, @@ -2071,7 +1692,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneID_72( cal: *const UCalendar, result: *mut UChar, @@ -2087,7 +1708,7 @@ pub enum UCalendarDisplayNameType { UCAL_DST = 2, UCAL_SHORT_DST = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneDisplayName_72( cal: *const UCalendar, type_: UCalendarDisplayNameType, @@ -2097,17 +1718,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_inDaylightTime_72(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_setGregorianChange_72( cal: *mut UCalendar, date: UDate, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getGregorianChange_72(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; } #[repr(u32)] @@ -2126,25 +1747,25 @@ pub enum UCalendarWallTimeOption { UCAL_WALLTIME_FIRST = 1, UCAL_WALLTIME_NEXT_VALID = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_getAttribute_72(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setAttribute_72(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_getAvailable_72(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_countAvailable_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getMillis_72(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_setMillis_72(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDate_72( cal: *mut UCalendar, year: i32, @@ -2153,7 +1774,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDateTime_72( cal: *mut UCalendar, year: i32, @@ -2165,10 +1786,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_equivalentTo_72(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_add_72( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2176,7 +1797,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_roll_72( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2184,23 +1805,23 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_get_72( cal: *const UCalendar, field: UCalendarDateFields, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_set_72(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_isSet_72(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_clearField_72(cal: *mut UCalendar, field: UCalendarDateFields); } -extern "C" { +unsafe extern "C" { pub fn ucal_clear_72(calendar: *mut UCalendar); } #[repr(u32)] @@ -2213,7 +1834,7 @@ pub enum UCalendarLimitType { UCAL_ACTUAL_MINIMUM = 4, UCAL_ACTUAL_MAXIMUM = 5, } -extern "C" { +unsafe extern "C" { pub fn ucal_getLimit_72( cal: *const UCalendar, field: UCalendarDateFields, @@ -2221,17 +1842,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getLocaleByType_72( cal: *const UCalendar, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTZDataVersion_72(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getCanonicalTimeZoneID_72( id: *const UChar, len: i32, @@ -2241,13 +1862,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getType_72( cal: *const UCalendar, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getKeywordValuesForLocale_72( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -2263,24 +1884,24 @@ pub enum UCalendarWeekdayType { UCAL_WEEKEND_ONSET = 2, UCAL_WEEKEND_CEASE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getDayOfWeekType_72( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> UCalendarWeekdayType; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWeekendTransition_72( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_isWeekend_72(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getFieldDifference_72( cal: *mut UCalendar, target: UDate, @@ -2296,7 +1917,7 @@ pub enum UTimeZoneTransitionType { UCAL_TZ_TRANSITION_PREVIOUS = 2, UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneTransitionDate_72( cal: *const UCalendar, type_: UTimeZoneTransitionType, @@ -2304,7 +1925,7 @@ extern "C" { status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWindowsTimeZoneID_72( id: *const UChar, len: i32, @@ -2313,7 +1934,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneIDForWindowsID_72( winid: *const UChar, len: i32, @@ -2333,7 +1954,7 @@ pub enum UTimeZoneLocalOption { UCAL_TZ_LOCAL_DAYLIGHT_FORMER = 7, UCAL_TZ_LOCAL_DAYLIGHT_LATTER = 15, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneOffsetFromLocal_72( cal: *const UCalendar, nonExistingTimeOpt: UTimeZoneLocalOption, @@ -2343,10 +1964,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_init_72(status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn u_cleanup_72(); } pub type UMemAllocFn = ::std::option::Option< @@ -2365,7 +1986,7 @@ pub type UMemReallocFn = ::std::option::Option< pub type UMemFreeFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), >; -extern "C" { +unsafe extern "C" { pub fn u_setMemoryFunctions_72( context: *const ::std::os::raw::c_void, a: UMemAllocFn, @@ -2385,7 +2006,7 @@ pub type UMtxInitFn = ::std::option::Option< pub type UMtxFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), >; -extern "C" { +unsafe extern "C" { pub fn u_setMutexFunctions_72( context: *const ::std::os::raw::c_void, init: UMtxInitFn, @@ -2398,7 +2019,7 @@ extern "C" { pub type UMtxAtomicFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, >; -extern "C" { +unsafe extern "C" { pub fn u_setAtomicIncDecFunctions_72( context: *const ::std::os::raw::c_void, inc: UMtxAtomicFn, @@ -2433,102 +2054,29 @@ pub struct UConverterFromUnicodeArgs { pub targetLimit: *const ::std::os::raw::c_char, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterFromUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterFromUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2550,102 +2098,28 @@ pub struct UConverterToUnicodeArgs { pub targetLimit: *const UChar, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterToUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterToUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2725,39 +2199,39 @@ pub type UConverterFromUCallback = ::std::option::Option< pErrorCode: *mut UErrorCode, ), >; -extern "C" { +unsafe extern "C" { pub fn ucnv_compareNames_72( name1: *const ::std::os::raw::c_char, name2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ucnv_open_72( converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openU_72(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openCCSID_72( codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openPackage_72( packageName: *const ::std::os::raw::c_char, converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_clone_72(cnv: *const UConverter, status: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_safeClone_72( cnv: *const UConverter, stackBuffer: *mut ::std::os::raw::c_void, @@ -2765,10 +2239,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_close_72(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getSubstChars_72( converter: *const UConverter, subChars: *mut ::std::os::raw::c_char, @@ -2776,7 +2250,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstChars_72( converter: *mut UConverter, subChars: *const ::std::os::raw::c_char, @@ -2784,7 +2258,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstString_72( cnv: *mut UConverter, s: *const UChar, @@ -2792,7 +2266,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidChars_72( converter: *const UConverter, errBytes: *mut ::std::os::raw::c_char, @@ -2800,7 +2274,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidUChars_72( converter: *const UConverter, errUChars: *mut UChar, @@ -2808,22 +2282,22 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_reset_72(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetToUnicode_72(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetFromUnicode_72(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMaxCharSize_72(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMinCharSize_72(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDisplayName_72( converter: *const UConverter, displayLocale: *const ::std::os::raw::c_char, @@ -2832,25 +2306,25 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getName_72( converter: *const UConverter, err: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCCSID_72(converter: *const UConverter, err: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getPlatform_72( converter: *const UConverter, err: *mut UErrorCode, ) -> UConverterPlatform; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getType_72(converter: *const UConverter) -> UConverterType; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStarters_72( converter: *const UConverter, starters: *mut UBool, @@ -2864,7 +2338,7 @@ pub enum UConverterUnicodeSet { UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, UCNV_SET_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn ucnv_getUnicodeSet_72( cnv: *const UConverter, setFillIn: *mut USet, @@ -2872,21 +2346,21 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getToUCallBack_72( converter: *const UConverter, action: *mut UConverterToUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getFromUCallBack_72( converter: *const UConverter, action: *mut UConverterFromUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setToUCallBack_72( converter: *mut UConverter, newAction: UConverterToUCallback, @@ -2896,7 +2370,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFromUCallBack_72( converter: *mut UConverter, newAction: UConverterFromUCallback, @@ -2906,7 +2380,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUnicode_72( converter: *mut UConverter, target: *mut *mut ::std::os::raw::c_char, @@ -2918,7 +2392,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUnicode_72( converter: *mut UConverter, target: *mut *mut UChar, @@ -2930,7 +2404,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUChars_72( cnv: *mut UConverter, dest: *mut ::std::os::raw::c_char, @@ -2940,7 +2414,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUChars_72( cnv: *mut UConverter, dest: *mut UChar, @@ -2950,7 +2424,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getNextUChar_72( converter: *mut UConverter, source: *mut *const ::std::os::raw::c_char, @@ -2958,7 +2432,7 @@ extern "C" { err: *mut UErrorCode, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_convertEx_72( targetCnv: *mut UConverter, sourceCnv: *mut UConverter, @@ -2975,7 +2449,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_convert_72( toConverterName: *const ::std::os::raw::c_char, fromConverterName: *const ::std::os::raw::c_char, @@ -2986,7 +2460,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toAlgorithmic_72( algorithmicType: UConverterType, cnv: *mut UConverter, @@ -2997,7 +2471,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromAlgorithmic_72( cnv: *mut UConverter, algorithmicType: UConverterType, @@ -3008,87 +2482,87 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_flushCache_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAvailable_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAvailableName_72(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openAllNames_72(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAliases_72( alias: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAlias_72( alias: *const ::std::os::raw::c_char, n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAliases_72( alias: *const ::std::os::raw::c_char, aliases: *mut *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_openStandardNames_72( convName: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countStandards_72() -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandard_72( n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandardName_72( name: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCanonicalName_72( alias: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDefaultName_72() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setDefaultName_72(name: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fixFileSeparator_72(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); } -extern "C" { +unsafe extern "C" { pub fn ucnv_isAmbiguous_72(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFallback_72(cnv: *mut UConverter, usesFallback: UBool); } -extern "C" { +unsafe extern "C" { pub fn ucnv_usesFallback_72(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_detectUnicodeSignature_72( source: *const ::std::os::raw::c_char, sourceLength: i32, @@ -3096,13 +2570,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUCountPending_72(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUCountPending_72(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_isFixedWidth_72(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; } #[repr(u32)] @@ -3157,181 +2631,42 @@ pub struct UCharIterator { pub getState: UCharIteratorGetState, pub setState: UCharIteratorSetState, } -#[test] -fn bindgen_test_layout_UCharIterator() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UCharIterator)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCharIterator)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedField) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedField) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).move_) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasNext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasPrevious) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasPrevious) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(current) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).previous) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(previous) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedFn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedFn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getState) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setState) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(setState) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; impl Default for UCharIterator { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3361,22 +2696,22 @@ pub enum UNormalizationCheckResult { pub struct UNormalizer2 { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFCInstance_72(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFDInstance_72(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCInstance_72(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKDInstance_72(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCCasefoldInstance_72(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getInstance_72( packageName: *const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char, @@ -3384,17 +2719,17 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_openFiltered_72( norm2: *const UNormalizer2, filterSet: *const USet, pErrorCode: *mut UErrorCode, ) -> *mut UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_close_72(norm2: *mut UNormalizer2); } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalize_72( norm2: *const UNormalizer2, src: *const UChar, @@ -3404,7 +2739,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalizeSecondAndAppend_72( norm2: *const UNormalizer2, first: *mut UChar, @@ -3415,7 +2750,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_append_72( norm2: *const UNormalizer2, first: *mut UChar, @@ -3426,7 +2761,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getDecomposition_72( norm2: *const UNormalizer2, c: UChar32, @@ -3435,7 +2770,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getRawDecomposition_72( norm2: *const UNormalizer2, c: UChar32, @@ -3444,13 +2779,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_composePair_72(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getCombiningClass_72(norm2: *const UNormalizer2, c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isNormalized_72( norm2: *const UNormalizer2, s: *const UChar, @@ -3458,7 +2793,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_quickCheck_72( norm2: *const UNormalizer2, s: *const UChar, @@ -3466,7 +2801,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UNormalizationCheckResult; } -extern "C" { +unsafe extern "C" { pub fn unorm2_spanQuickCheckYes_72( norm2: *const UNormalizer2, s: *const UChar, @@ -3474,13 +2809,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryBefore_72(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryAfter_72(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isInert_72(norm2: *const UNormalizer2, c: UChar32) -> UBool; } impl UNormalizationMode { @@ -3576,13 +2911,13 @@ pub enum UColRuleOption { UCOL_TAILORING_ONLY = 0, UCOL_FULL_RULES = 1, } -extern "C" { +unsafe extern "C" { pub fn ucol_open_72( loc: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openRules_72( rules: *const UChar, rulesLength: i32, @@ -3592,7 +2927,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openFromShortString_72( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3600,14 +2935,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractions_72( coll: *const UCollator, conts: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractionsAndExpansions_72( coll: *const UCollator, contractions: *mut USet, @@ -3616,10 +2951,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_close_72(coll: *mut UCollator); } -extern "C" { +unsafe extern "C" { pub fn ucol_strcoll_72( coll: *const UCollator, source: *const UChar, @@ -3628,7 +2963,7 @@ extern "C" { targetLength: i32, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollUTF8_72( coll: *const UCollator, source: *const ::std::os::raw::c_char, @@ -3638,7 +2973,7 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_greater_72( coll: *const UCollator, source: *const UChar, @@ -3647,7 +2982,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_greaterOrEqual_72( coll: *const UCollator, source: *const UChar, @@ -3656,7 +2991,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_equal_72( coll: *const UCollator, source: *const UChar, @@ -3665,7 +3000,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollIter_72( coll: *const UCollator, sIter: *mut UCharIterator, @@ -3673,13 +3008,13 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_getStrength_72(coll: *const UCollator) -> UCollationStrength; } -extern "C" { +unsafe extern "C" { pub fn ucol_setStrength_72(coll: *mut UCollator, strength: UCollationStrength); } -extern "C" { +unsafe extern "C" { pub fn ucol_getReorderCodes_72( coll: *const UCollator, dest: *mut i32, @@ -3687,7 +3022,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setReorderCodes_72( coll: *mut UCollator, reorderCodes: *const i32, @@ -3695,7 +3030,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getEquivalentReorderCodes_72( reorderCode: i32, dest: *mut i32, @@ -3703,7 +3038,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getDisplayName_72( objLoc: *const ::std::os::raw::c_char, dispLoc: *const ::std::os::raw::c_char, @@ -3712,25 +3047,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getAvailable_72(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_countAvailable_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openAvailableLocales_72(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywords_72(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValues_72( keyword: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValuesForLocale_72( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -3738,7 +3073,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getFunctionalEquivalent_72( result: *mut ::std::os::raw::c_char, resultCapacity: i32, @@ -3748,10 +3083,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRules_72(coll: *const UCollator, length: *mut i32) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ucol_getShortDefinitionString_72( coll: *const UCollator, locale: *const ::std::os::raw::c_char, @@ -3760,7 +3095,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_normalizeShortDefinitionString_72( source: *const ::std::os::raw::c_char, destination: *mut ::std::os::raw::c_char, @@ -3769,7 +3104,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getSortKey_72( coll: *const UCollator, source: *const UChar, @@ -3778,7 +3113,7 @@ extern "C" { resultLength: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_nextSortKeyPart_72( coll: *const UCollator, iter: *mut UCharIterator, @@ -3796,7 +3131,7 @@ pub enum UColBoundMode { UCOL_BOUND_UPPER_LONG = 2, UCOL_BOUND_VALUE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn ucol_getBound_72( source: *const u8, sourceLength: i32, @@ -3807,13 +3142,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVersion_72(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_getUCAVersion_72(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_mergeSortkeys_72( src1: *const u8, src1Length: i32, @@ -3823,7 +3158,7 @@ extern "C" { destCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setAttribute_72( coll: *mut UCollator, attr: UColAttribute, @@ -3831,24 +3166,24 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getAttribute_72( coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode, ) -> UColAttributeValue; } -extern "C" { +unsafe extern "C" { pub fn ucol_setMaxVariable_72( coll: *mut UCollator, group: UColReorderCode, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getMaxVariable_72(coll: *const UCollator) -> UColReorderCode; } -extern "C" { +unsafe extern "C" { pub fn ucol_setVariableTop_72( coll: *mut UCollator, varTop: *const UChar, @@ -3856,16 +3191,16 @@ extern "C" { status: *mut UErrorCode, ) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVariableTop_72(coll: *const UCollator, status: *mut UErrorCode) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_restoreVariableTop_72(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucol_clone_72(coll: *const UCollator, status: *mut UErrorCode) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_safeClone_72( coll: *const UCollator, stackBuffer: *mut ::std::os::raw::c_void, @@ -3873,7 +3208,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRulesEx_72( coll: *const UCollator, delta: UColRuleOption, @@ -3881,31 +3216,31 @@ extern "C" { bufferLen: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocale_72( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocaleByType_72( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getTailoredSet_72(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn ucol_getUnsafeSet_72( coll: *const UCollator, unsafe_: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_prepareShortStringOpen_72( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3913,7 +3248,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_cloneBinary_72( coll: *const UCollator, buffer: *mut u8, @@ -3921,7 +3256,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openBinary_72( bin: *const u8, length: i32, @@ -3939,13 +3274,13 @@ pub struct UCharsetDetector { pub struct UCharsetMatch { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ucsdet_open_72(status: *mut UErrorCode) -> *mut UCharsetDetector; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_close_72(ucsd: *mut UCharsetDetector); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setText_72( ucsd: *mut UCharsetDetector, textIn: *const ::std::os::raw::c_char, @@ -3953,7 +3288,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDeclaredEncoding_72( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3961,35 +3296,35 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detect_72( ucsd: *mut UCharsetDetector, status: *mut UErrorCode, ) -> *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detectAll_72( ucsd: *mut UCharsetDetector, matchesFound: *mut i32, status: *mut UErrorCode, ) -> *mut *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getName_72( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getConfidence_72(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getLanguage_72( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getUChars_72( ucsm: *const UCharsetMatch, buf: *mut UChar, @@ -3997,25 +3332,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getAllDetectableCharsets_72( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_isInputFilterEnabled_72(ucsd: *const UCharsetDetector) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_enableInputFilter_72(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getDetectableCharsets_72( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDetectableCharset_72( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -4030,51 +3365,17 @@ pub struct UFieldPosition { pub beginIndex: i32, pub endIndex: i32, } -#[test] -fn bindgen_test_layout_UFieldPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(UFieldPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UFieldPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(field) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).beginIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(beginIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).endIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(endIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UFormattableType { @@ -4088,54 +3389,54 @@ pub enum UFormattableType { UFMT_COUNT = 7, } pub type UFormattable = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn ufmt_open_72(status: *mut UErrorCode) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_close_72(fmt: *mut UFormattable); } -extern "C" { +unsafe extern "C" { pub fn ufmt_getType_72(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; } -extern "C" { +unsafe extern "C" { pub fn ufmt_isNumeric_72(fmt: *const UFormattable) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDate_72(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDouble_72(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getLong_72(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getInt64_72(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getObject_72( fmt: *const UFormattable, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getUChars_72( fmt: *mut UFormattable, len: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayLength_72(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayItemByIndex_72( fmt: *mut UFormattable, n: i32, status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDecNumChars_72( fmt: *mut UFormattable, len: *mut i32, @@ -4170,13 +3471,13 @@ pub enum UDisplayContext { pub struct UFieldPositionIterator { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_open_72(status: *mut UErrorCode) -> *mut UFieldPositionIterator; } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_close_72(fpositer: *mut UFieldPositionIterator); } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_next_72( fpositer: *mut UFieldPositionIterator, beginIndex: *mut i32, @@ -4212,7 +3513,7 @@ pub enum UNumberFormatStyle { UNUM_CURRENCY_STANDARD = 16, UNUM_FORMAT_STYLE_COUNT = 17, } -extern "C" { +unsafe extern "C" { pub fn unum_open_72( style: UNumberFormatStyle, pattern: *const UChar, @@ -4222,13 +3523,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_close_72(fmt: *mut UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn unum_clone_72(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_format_72( fmt: *const UNumberFormat, number: i32, @@ -4238,7 +3539,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatInt64_72( fmt: *const UNumberFormat, number: i64, @@ -4248,7 +3549,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDouble_72( fmt: *const UNumberFormat, number: f64, @@ -4258,7 +3559,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleForFields_72( format: *const UNumberFormat, number: f64, @@ -4268,7 +3569,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDecimal_72( fmt: *const UNumberFormat, number: *const ::std::os::raw::c_char, @@ -4279,7 +3580,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleCurrency_72( fmt: *const UNumberFormat, number: f64, @@ -4290,7 +3591,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatUFormattable_72( fmt: *const UNumberFormat, number: *const UFormattable, @@ -4300,7 +3601,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parse_72( fmt: *const UNumberFormat, text: *const UChar, @@ -4309,7 +3610,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseInt64_72( fmt: *const UNumberFormat, text: *const UChar, @@ -4318,7 +3619,7 @@ extern "C" { status: *mut UErrorCode, ) -> i64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDouble_72( fmt: *const UNumberFormat, text: *const UChar, @@ -4327,7 +3628,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDecimal_72( fmt: *const UNumberFormat, text: *const UChar, @@ -4338,7 +3639,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDoubleCurrency_72( fmt: *const UNumberFormat, text: *const UChar, @@ -4348,7 +3649,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseToUFormattable_72( fmt: *const UNumberFormat, result: *mut UFormattable, @@ -4358,7 +3659,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn unum_applyPattern_72( format: *mut UNumberFormat, localized: UBool, @@ -4368,10 +3669,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getAvailable_72(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_countAvailable_72() -> i32; } #[repr(u32)] @@ -4409,26 +3710,26 @@ pub enum UNumberFormatAttribute { UNUM_SIGN_ALWAYS_SHOWN = 4100, UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 4101, } -extern "C" { +unsafe extern "C" { pub fn unum_hasAttribute_72(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> bool; } -extern "C" { +unsafe extern "C" { pub fn unum_getAttribute_72(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setAttribute_72( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, newValue: i32, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getDoubleAttribute_72( fmt: *const UNumberFormat, attr: UNumberFormatAttribute, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_setDoubleAttribute_72( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, @@ -4447,7 +3748,7 @@ pub enum UNumberFormatTextAttribute { UNUM_DEFAULT_RULESET = 6, UNUM_PUBLIC_RULESETS = 7, } -extern "C" { +unsafe extern "C" { pub fn unum_getTextAttribute_72( fmt: *const UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4456,7 +3757,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setTextAttribute_72( fmt: *mut UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4465,7 +3766,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_toPattern_72( fmt: *const UNumberFormat, isPatternLocalized: UBool, @@ -4508,7 +3809,7 @@ pub enum UNumberFormatSymbol { UNUM_APPROXIMATELY_SIGN_SYMBOL = 28, UNUM_FORMAT_SYMBOL_COUNT = 29, } -extern "C" { +unsafe extern "C" { pub fn unum_getSymbol_72( fmt: *const UNumberFormat, symbol: UNumberFormatSymbol, @@ -4517,7 +3818,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setSymbol_72( fmt: *mut UNumberFormat, symbol: UNumberFormatSymbol, @@ -4526,21 +3827,21 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getLocaleByType_72( fmt: *const UNumberFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_setContext_72( fmt: *mut UNumberFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getContext_72( fmt: *const UNumberFormat, type_: UDisplayContextType, @@ -4614,10 +3915,10 @@ pub enum UDateFormatField { UDAT_TIME_SEPARATOR_FIELD = 37, UDAT_FIELD_COUNT = 38, } -extern "C" { +unsafe extern "C" { pub fn udat_toCalendarDateField_72(field: UDateFormatField) -> UCalendarDateFields; } -extern "C" { +unsafe extern "C" { pub fn udat_open_72( timeStyle: UDateFormatStyle, dateStyle: UDateFormatStyle, @@ -4629,7 +3930,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_close_72(format: *mut UDateFormat); } #[repr(u32)] @@ -4641,14 +3942,14 @@ pub enum UDateFormatBooleanAttribute { UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udat_getBooleanAttribute_72( fmt: *const UDateFormat, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setBooleanAttribute_72( fmt: *mut UDateFormat, attr: UDateFormatBooleanAttribute, @@ -4664,10 +3965,10 @@ pub enum UDateFormatHourCycle { UDAT_HOUR_CYCLE_23 = 2, UDAT_HOUR_CYCLE_24 = 3, } -extern "C" { +unsafe extern "C" { pub fn udat_clone_72(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_format_72( format: *const UDateFormat, dateToFormat: UDate, @@ -4677,7 +3978,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendar_72( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4687,7 +3988,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatForFields_72( format: *const UDateFormat, dateToFormat: UDate, @@ -4697,7 +3998,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendarForFields_72( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4707,7 +4008,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_parse_72( format: *const UDateFormat, text: *const UChar, @@ -4716,7 +4017,7 @@ extern "C" { status: *mut UErrorCode, ) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_parseCalendar_72( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4726,28 +4027,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_isLenient_72(fmt: *const UDateFormat) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setLenient_72(fmt: *mut UDateFormat, isLenient: UBool); } -extern "C" { +unsafe extern "C" { pub fn udat_getCalendar_72(fmt: *const UDateFormat) -> *const UCalendar; } -extern "C" { +unsafe extern "C" { pub fn udat_setCalendar_72(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormat_72(fmt: *const UDateFormat) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormatForField_72( fmt: *const UDateFormat, field: UChar, ) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormatForFields_72( fmt: *mut UDateFormat, fields: *const UChar, @@ -4755,28 +4056,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_setNumberFormat_72(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormat_72( fmt: *mut UDateFormat, numberFormatToAdopt: *mut UNumberFormat, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getAvailable_72(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_countAvailable_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_get2DigitYearStart_72(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_set2DigitYearStart_72(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_toPattern_72( fmt: *const UDateFormat, localized: UBool, @@ -4785,7 +4086,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPattern_72( format: *mut UDateFormat, localized: UBool, @@ -4832,7 +4133,7 @@ pub enum UDateFormatSymbolType { pub struct UDateFormatSymbols { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn udat_getSymbols_72( fmt: *const UDateFormat, type_: UDateFormatSymbolType, @@ -4842,10 +4143,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_countSymbols_72(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_setSymbols_72( format: *mut UDateFormat, type_: UDateFormatSymbolType, @@ -4855,28 +4156,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getLocaleByType_72( fmt: *const UDateFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_setContext_72( fmt: *mut UDateFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getContext_72( fmt: *const UDateFormat, type_: UDisplayContextType, status: *mut UErrorCode, ) -> UDisplayContext; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeDate_72( fmt: *const UDateFormat, result: *mut UChar, @@ -4884,7 +4185,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeTime_72( fmt: *const UDateFormat, result: *mut UChar, @@ -4892,7 +4193,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPatternRelative_72( format: *mut UDateFormat, datePattern: *const UChar, @@ -4914,10 +4215,10 @@ pub type UDateFormatOpener = ::std::option::Option< status: *mut UErrorCode, ) -> *mut UDateFormat, >; -extern "C" { +unsafe extern "C" { pub fn udat_registerOpener_72(opener: UDateFormatOpener, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_unregisterOpener_72( opener: UDateFormatOpener, status: *mut UErrorCode, @@ -4969,25 +4270,25 @@ pub enum UDateTimePatternConflict { UDATPG_CONFLICT = 2, UDATPG_CONFLICT_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn udatpg_open_72( locale: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openEmpty_72(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_close_72(dtpg: *mut UDateTimePatternGenerator); } -extern "C" { +unsafe extern "C" { pub fn udatpg_clone_72( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPattern_72( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -4997,7 +4298,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPatternWithOptions_72( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -5008,7 +4309,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getSkeleton_72( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5018,7 +4319,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBaseSkeleton_72( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5028,7 +4329,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_addPattern_72( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5040,7 +4341,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UDateTimePatternConflict; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemFormat_72( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5048,14 +4349,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemFormat_72( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemName_72( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5063,14 +4364,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemName_72( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getFieldDisplayName_72( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5080,20 +4381,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormat_72( dtpg: *const UDateTimePatternGenerator, dtFormat: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormat_72( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormatForStyle_72( udtpg: *mut UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5102,7 +4403,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormatForStyle_72( udtpg: *const UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5110,20 +4411,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDecimal_72( dtpg: *mut UDateTimePatternGenerator, decimal: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDecimal_72( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypes_72( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5135,7 +4436,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypesWithOptions_72( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5148,19 +4449,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openSkeletons_72( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openBaseSkeletons_72( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getPatternForSkeleton_72( dtpg: *const UDateTimePatternGenerator, skeleton: *const UChar, @@ -5168,7 +4469,7 @@ extern "C" { pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDefaultHourCycle_72( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, @@ -5187,111 +4488,28 @@ pub struct UDataInfo { pub formatVersion: [u8; 4usize], pub dataVersion: [u8; 4usize], } -#[test] -fn bindgen_test_layout_UDataInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(UDataInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(UDataInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedWord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isBigEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(isBigEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charsetFamily) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(charsetFamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeofUChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(sizeofUChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedByte) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedByte) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataFormat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataFormat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formatVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(formatVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UDataMemory { @@ -5305,7 +4523,7 @@ pub type UDataMemoryIsAcceptable = ::std::option::Option< pInfo: *const UDataInfo, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn udata_open_72( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5313,7 +4531,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_openChoice_72( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5323,19 +4541,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_close_72(pData: *mut UDataMemory); } -extern "C" { +unsafe extern "C" { pub fn udata_getMemory_72(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn udata_getInfo_72(pData: *mut UDataMemory, pInfo: *mut UDataInfo); } -extern "C" { +unsafe extern "C" { pub fn udata_setCommonData_72(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udata_setAppData_72( packageName: *const ::std::os::raw::c_char, data: *const ::std::os::raw::c_void, @@ -5354,7 +4572,7 @@ pub enum UDataFileAccess { UDATA_NO_FILES = 3, UDATA_FILE_ACCESS_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udata_setFileAccess_72(access: UDataFileAccess, status: *mut UErrorCode); } #[repr(u32)] @@ -5406,13 +4624,13 @@ pub enum UListFormatterWidth { ULISTFMT_WIDTH_SHORT = 1, ULISTFMT_WIDTH_NARROW = 2, } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_open_72( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openForType_72( locale: *const ::std::os::raw::c_char, type_: UListFormatterType, @@ -5420,22 +4638,22 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_close_72(listfmt: *mut UListFormatter); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openResult_72(ec: *mut UErrorCode) -> *mut UFormattedList; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_resultAsValue_72( uresult: *const UFormattedList, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_closeResult_72(uresult: *mut UFormattedList); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_format_72( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5446,7 +4664,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_formatStringsToResult_72( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5457,7 +4675,7 @@ extern "C" { ); } pub type va_list = __builtin_va_list; -extern "C" { +unsafe extern "C" { pub fn u_formatMessage_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5468,7 +4686,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessage_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5479,7 +4697,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessage_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5490,7 +4708,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessage_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5501,7 +4719,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_formatMessageWithError_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5513,7 +4731,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessageWithError_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5525,7 +4743,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessageWithError_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5537,7 +4755,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessageWithError_72( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5550,7 +4768,7 @@ extern "C" { ); } pub type UMessageFormat = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn umsg_open_72( pattern: *const UChar, patternLength: i32, @@ -5559,19 +4777,19 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_close_72(format: *mut UMessageFormat); } -extern "C" { +unsafe extern "C" { pub fn umsg_clone_72(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_setLocale_72(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn umsg_getLocale_72(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn umsg_applyPattern_72( fmt: *mut UMessageFormat, pattern: *const UChar, @@ -5580,7 +4798,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_toPattern_72( fmt: *const UMessageFormat, result: *mut UChar, @@ -5588,7 +4806,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_format_72( fmt: *const UMessageFormat, result: *mut UChar, @@ -5597,7 +4815,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_vformat_72( fmt: *const UMessageFormat, result: *mut UChar, @@ -5606,7 +4824,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_parse_72( fmt: *const UMessageFormat, source: *const UChar, @@ -5616,7 +4834,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn umsg_vparse_72( fmt: *const UMessageFormat, source: *const UChar, @@ -5626,7 +4844,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_autoQuoteApostrophe_72( pattern: *const UChar, patternLength: i32, @@ -5645,7 +4863,7 @@ pub struct UNumberFormatter { pub struct UFormattedNumber { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocale_72( skeleton: *const UChar, skeletonLen: i32, @@ -5653,7 +4871,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocaleWithError_72( skeleton: *const UChar, skeletonLen: i32, @@ -5662,10 +4880,10 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openResult_72(ec: *mut UErrorCode) -> *mut UFormattedNumber; } -extern "C" { +unsafe extern "C" { pub fn unumf_formatInt_72( uformatter: *const UNumberFormatter, value: i64, @@ -5673,7 +4891,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDouble_72( uformatter: *const UNumberFormatter, value: f64, @@ -5681,7 +4899,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDecimal_72( uformatter: *const UNumberFormatter, value: *const ::std::os::raw::c_char, @@ -5690,13 +4908,13 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultAsValue_72( uresult: *const UFormattedNumber, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToString_72( uresult: *const UFormattedNumber, buffer: *mut UChar, @@ -5704,21 +4922,21 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultNextFieldPosition_72( uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultGetAllFieldPositions_72( uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToDecimalNumber_72( uresult: *const UFormattedNumber, dest: *mut ::std::os::raw::c_char, @@ -5726,10 +4944,10 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_close_72(uformatter: *mut UNumberFormatter); } -extern "C" { +unsafe extern "C" { pub fn unumf_closeResult_72(uresult: *mut UFormattedNumber); } #[repr(C)] @@ -5749,23 +4967,23 @@ pub enum UPluralType { pub struct UPluralRules { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uplrules_open_72( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_openForType_72( locale: *const ::std::os::raw::c_char, type_: UPluralType, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_close_72(uplrules: *mut UPluralRules); } -extern "C" { +unsafe extern "C" { pub fn uplrules_select_72( uplrules: *const UPluralRules, number: f64, @@ -5774,7 +4992,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectFormatted_72( uplrules: *const UPluralRules, number: *const UFormattedNumber, @@ -5783,7 +5001,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectForRange_72( uplrules: *const UPluralRules, urange: *const UFormattedNumberRange, @@ -5792,7 +5010,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectWithFormat_72( uplrules: *const UPluralRules, number: f64, @@ -5802,53 +5020,53 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_getKeywords_72( uplrules: *const UPluralRules, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn u_getDataDirectory_72() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setDataDirectory_72(directory: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_72(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_72( path: *const ::std::os::raw::c_char, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_charsToUChars_72(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_UCharsToChars_72(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_strlen_72(s: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_countChar32_72(s: *const UChar, length: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strHasMoreChar32Than_72(s: *const UChar, length: i32, number: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_strcat_72(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncat_72(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strstr_72(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindFirst_72( s: *const UChar, length: i32, @@ -5856,16 +5074,16 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr_72(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr32_72(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrstr_72(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindLast_72( s: *const UChar, length: i32, @@ -5873,35 +5091,35 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr_72(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr32_72(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strpbrk_72(string: *const UChar, matchSet: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcspn_72(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strspn_72(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strtok_r_72( src: *mut UChar, delim: *const UChar, saveState: *mut *mut UChar, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcmp_72(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcmpCodePointOrder_72(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompare_72( s1: *const UChar, length1: i32, @@ -5910,14 +5128,14 @@ extern "C" { codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompareIter_72( iter1: *mut UCharIterator, iter2: *mut UCharIterator, codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCaseCompare_72( s1: *const UChar, length1: i32, @@ -5927,78 +5145,78 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmp_72(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmpCodePointOrder_72(s1: *const UChar, s2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcasecmp_72(s1: *const UChar, s2: *const UChar, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncasecmp_72(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcasecmp_72(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcpy_72(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncpy_72(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrcpy_72(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrncpy_72( dst: *mut UChar, src: *const ::std::os::raw::c_char, n: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_austrcpy_72( dst: *mut ::std::os::raw::c_char, src: *const UChar, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_austrncpy_72( dst: *mut ::std::os::raw::c_char, src: *const UChar, n: i32, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_memcpy_72(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memmove_72(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memset_72(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memcmp_72(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcmpCodePointOrder_72(s1: *const UChar, s2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memchr_72(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memchr32_72(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr_72(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr32_72(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_unescape_72( src: *const ::std::os::raw::c_char, dest: *mut UChar, @@ -6008,7 +5226,7 @@ extern "C" { pub type UNESCAPE_CHAR_AT = ::std::option::Option< unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, >; -extern "C" { +unsafe extern "C" { pub fn u_unescapeAt_72( charAt: UNESCAPE_CHAR_AT, offset: *mut i32, @@ -6016,7 +5234,7 @@ extern "C" { context: *mut ::std::os::raw::c_void, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strToUpper_72( dest: *mut UChar, destCapacity: i32, @@ -6026,7 +5244,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToLower_72( dest: *mut UChar, destCapacity: i32, @@ -6036,7 +5254,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToTitle_72( dest: *mut UChar, destCapacity: i32, @@ -6047,7 +5265,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strFoldCase_72( dest: *mut UChar, destCapacity: i32, @@ -6057,7 +5275,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToWCS_72( dest: *mut wchar_t, destCapacity: i32, @@ -6067,7 +5285,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut wchar_t; } -extern "C" { +unsafe extern "C" { pub fn u_strFromWCS_72( dest: *mut UChar, destCapacity: i32, @@ -6077,7 +5295,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8_72( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6087,7 +5305,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8_72( dest: *mut UChar, destCapacity: i32, @@ -6097,7 +5315,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8WithSub_72( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6109,7 +5327,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8WithSub_72( dest: *mut UChar, destCapacity: i32, @@ -6121,7 +5339,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8Lenient_72( dest: *mut UChar, destCapacity: i32, @@ -6131,7 +5349,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32_72( dest: *mut UChar32, destCapacity: i32, @@ -6141,7 +5359,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32_72( dest: *mut UChar, destCapacity: i32, @@ -6151,7 +5369,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32WithSub_72( dest: *mut UChar32, destCapacity: i32, @@ -6163,7 +5381,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32WithSub_72( dest: *mut UChar, destCapacity: i32, @@ -6175,7 +5393,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToJavaModifiedUTF8_72( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6185,7 +5403,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromJavaModifiedUTF8WithSub_72( dest: *mut UChar, destCapacity: i32, @@ -6223,82 +5441,24 @@ pub struct UReplaceableCallbacks { unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), >, } -#[test] -fn bindgen_test_layout_UReplaceableCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charAt) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(charAt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).char32At) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(char32At) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(copy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; pub type UTransliterator = *mut ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] @@ -6314,62 +5474,20 @@ pub struct UTransPosition { pub start: i32, pub limit: i32, } -#[test] -fn bindgen_test_layout_UTransPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(UTransPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UTransPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextLimit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(limit) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { pub fn utrans_openU_72( id: *const UChar, idLength: i32, @@ -6380,34 +5498,34 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_openInverse_72( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_clone_72( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_close_72(trans: *mut UTransliterator); } -extern "C" { +unsafe extern "C" { pub fn utrans_getUnicodeID_72( trans: *const UTransliterator, resultLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn utrans_register_72(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn utrans_unregisterID_72(id: *const UChar, idLength: i32); } -extern "C" { +unsafe extern "C" { pub fn utrans_setFilter_72( trans: *mut UTransliterator, filterPattern: *const UChar, @@ -6415,13 +5533,13 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_countAvailableIDs_72() -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_openIDs_72(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn utrans_trans_72( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6431,7 +5549,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncremental_72( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6440,7 +5558,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transUChars_72( trans: *const UTransliterator, text: *mut UChar, @@ -6451,7 +5569,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncrementalUChars_72( trans: *const UTransliterator, text: *mut UChar, @@ -6461,7 +5579,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_toRules_72( trans: *const UTransliterator, escapeUnprintable: UBool, @@ -6470,7 +5588,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_getSourceSet_72( trans: *const UTransliterator, ignoreFilter: UBool, @@ -6478,7 +5596,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn utrans_open_72( id: *const ::std::os::raw::c_char, dir: UTransDirection, @@ -6488,17 +5606,17 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_getID_72( trans: *const UTransliterator, buf: *mut ::std::os::raw::c_char, bufCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_unregister_72(id: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn utrans_getAvailableID_72( index: i32, buf: *mut ::std::os::raw::c_char, @@ -6513,61 +5631,15 @@ pub union UCPTrieData { pub ptr32: *const u32, pub ptr8: *const u8, } -#[test] -fn bindgen_test_layout_UCPTrieData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(UCPTrieData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrieData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr16) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr8) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; impl Default for UCPTrieData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6594,151 +5666,28 @@ pub struct UCPTrie { pub dataNullOffset: i32, pub nullValue: u32, } -#[test] -fn bindgen_test_layout_UCPTrie() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UCPTrie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrie)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).indexLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(indexLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).highStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(highStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shifted12HighStart) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(shifted12HighStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valueWidth) as usize - ptr as usize }, - 31usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(valueWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved32) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index3NullOffset) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index3NullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataNullOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataNullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nullValue) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(nullValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; impl Default for UCPTrie { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6763,7 +5712,7 @@ pub enum UCPTrieValueWidth { UCPTRIE_VALUE_BITS_32 = 1, UCPTRIE_VALUE_BITS_8 = 2, } -extern "C" { +unsafe extern "C" { pub fn ucptrie_openFromBinary_72( type_: UCPTrieType, valueWidth: UCPTrieValueWidth, @@ -6773,19 +5722,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UCPTrie; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_close_72(trie: *mut UCPTrie); } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getType_72(trie: *const UCPTrie) -> UCPTrieType; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getValueWidth_72(trie: *const UCPTrie) -> UCPTrieValueWidth; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_get_72(trie: *const UCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getRange_72( trie: *const UCPTrie, start: UChar32, @@ -6796,7 +5745,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_toBinary_72( trie: *const UCPTrie, data: *mut ::std::os::raw::c_void, @@ -6804,13 +5753,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallIndex_72(trie: *const UCPTrie, c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallU8Index_72(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalU8PrevIndex_72( trie: *const UCPTrie, c: UChar32, @@ -6823,38 +5772,38 @@ extern "C" { pub struct UMutableCPTrie { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_open_72( initialValue: u32, errorValue: u32, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_clone_72( other: *const UMutableCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_close_72(trie: *mut UMutableCPTrie); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPMap_72( map: *const UCPMap, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPTrie_72( trie: *const UCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_get_72(trie: *const UMutableCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_getRange_72( trie: *const UMutableCPTrie, start: UChar32, @@ -6865,7 +5814,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_set_72( trie: *mut UMutableCPTrie, c: UChar32, @@ -6873,7 +5822,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_setRange_72( trie: *mut UMutableCPTrie, start: UChar32, @@ -6882,7 +5831,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_buildImmutable_72( trie: *mut UMutableCPTrie, type_: UCPTrieType, @@ -6899,61 +5848,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); diff --git a/rust_icu_sys/bindgen/lib_73.rs b/rust_icu_sys/bindgen/lib_73.rs index b59de71..791fbdf 100644 --- a/rust_icu_sys/bindgen/lib_73.rs +++ b/rust_icu_sys/bindgen/lib_73.rs @@ -1,23 +1,26 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type UBool = i8; pub type UChar = u16; pub type UChar32 = i32; pub type UVersionInfo = [u8; 4usize]; -extern "C" { +unsafe extern "C" { pub fn u_versionFromString_73( versionArray: *mut u8, versionString: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn u_versionFromUString_73(versionArray: *mut u8, versionString: *const UChar); } -extern "C" { - pub fn u_versionToString_73(versionArray: *mut u8, versionString: *mut ::std::os::raw::c_char); +unsafe extern "C" { + pub fn u_versionToString_73( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); } -extern "C" { +unsafe extern "C" { pub fn u_getVersion_73(versionArray: *mut u8); } pub type UDate = f64; @@ -212,7 +215,7 @@ pub enum UErrorCode { U_PLUGIN_DIDNT_SET_LEVEL = 66817, U_PLUGIN_ERROR_LIMIT = 66818, } -extern "C" { +unsafe extern "C" { pub fn u_errorName_73(code: UErrorCode) -> *const ::std::os::raw::c_char; } #[repr(C)] @@ -220,37 +223,37 @@ extern "C" { pub struct UEnumeration { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uenum_close_73(en: *mut UEnumeration); } -extern "C" { +unsafe extern "C" { pub fn uenum_count_73(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uenum_unext_73( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn uenum_next_73( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uenum_reset_73(en: *mut UEnumeration, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uenum_openUCharStringsEnumeration_73( strings: *const *const UChar, count: i32, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uenum_openCharStringsEnumeration_73( strings: *const *const ::std::os::raw::c_char, count: i32, @@ -265,13 +268,13 @@ pub enum ULocDataLocaleType { ULOC_REQUESTED_LOCALE = 2, ULOC_DATA_LOCALE_TYPE_LIMIT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_getDefault_73() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_setDefault_73(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uloc_getLanguage_73( localeID: *const ::std::os::raw::c_char, language: *mut ::std::os::raw::c_char, @@ -279,7 +282,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getScript_73( localeID: *const ::std::os::raw::c_char, script: *mut ::std::os::raw::c_char, @@ -287,7 +290,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getCountry_73( localeID: *const ::std::os::raw::c_char, country: *mut ::std::os::raw::c_char, @@ -295,7 +298,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getVariant_73( localeID: *const ::std::os::raw::c_char, variant: *mut ::std::os::raw::c_char, @@ -303,7 +306,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getName_73( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -311,7 +314,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_canonicalize_73( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -319,20 +322,20 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Language_73( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Country_73( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLCID_73(localeID: *const ::std::os::raw::c_char) -> u32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayLanguage_73( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -341,7 +344,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayScript_73( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -350,7 +353,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayCountry_73( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -359,7 +362,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayVariant_73( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -368,7 +371,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeyword_73( keyword: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -377,7 +380,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeywordValue_73( locale: *const ::std::os::raw::c_char, keyword: *const ::std::os::raw::c_char, @@ -387,7 +390,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayName_73( localeID: *const ::std::os::raw::c_char, inLocaleID: *const ::std::os::raw::c_char, @@ -396,10 +399,10 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getAvailable_73(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_countAvailable_73() -> i32; } #[repr(u32)] @@ -410,19 +413,19 @@ pub enum ULocAvailableType { ULOC_AVAILABLE_WITH_LEGACY_ALIASES = 2, ULOC_AVAILABLE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_openAvailableByType_73( type_: ULocAvailableType, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOLanguages_73() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOCountries_73() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getParent_73( localeID: *const ::std::os::raw::c_char, parent: *mut ::std::os::raw::c_char, @@ -430,7 +433,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getBaseName_73( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -438,13 +441,13 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_openKeywords_73( localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getKeywordValue_73( localeID: *const ::std::os::raw::c_char, keywordName: *const ::std::os::raw::c_char, @@ -453,7 +456,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_setKeywordValue_73( keywordName: *const ::std::os::raw::c_char, keywordValue: *const ::std::os::raw::c_char, @@ -462,7 +465,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_isRightToLeft_73(locale: *const ::std::os::raw::c_char) -> UBool; } #[repr(u32)] @@ -474,13 +477,13 @@ pub enum ULayoutType { ULOC_LAYOUT_BTT = 3, ULOC_LAYOUT_UNKNOWN = 4, } -extern "C" { +unsafe extern "C" { pub fn uloc_getCharacterOrientation_73( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> ULayoutType; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLineOrientation_73( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, @@ -493,7 +496,7 @@ pub enum UAcceptResult { ULOC_ACCEPT_VALID = 1, ULOC_ACCEPT_FALLBACK = 2, } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguageFromHTTP_73( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -503,7 +506,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguage_73( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -514,7 +517,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLocaleForLCID_73( hostID: u32, locale: *mut ::std::os::raw::c_char, @@ -522,7 +525,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_addLikelySubtags_73( localeID: *const ::std::os::raw::c_char, maximizedLocaleID: *mut ::std::os::raw::c_char, @@ -530,7 +533,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_minimizeSubtags_73( localeID: *const ::std::os::raw::c_char, minimizedLocaleID: *mut ::std::os::raw::c_char, @@ -538,7 +541,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_forLanguageTag_73( langtag: *const ::std::os::raw::c_char, localeID: *mut ::std::os::raw::c_char, @@ -547,7 +550,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLanguageTag_73( localeID: *const ::std::os::raw::c_char, langtag: *mut ::std::os::raw::c_char, @@ -556,23 +559,23 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleKey_73( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleType_73( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyKey_73( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyType_73( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, @@ -590,13 +593,13 @@ pub enum UCPMapRangeOption { UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, } -extern "C" { +unsafe extern "C" { pub fn ucpmap_get_73(map: *const UCPMap, c: UChar32) -> u32; } pub type UCPMapValueFilter = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, >; -extern "C" { +unsafe extern "C" { pub fn ucpmap_getRange_73( map: *const UCPMap, start: UChar32, @@ -837,115 +840,115 @@ pub enum UPropertyNameChoice { U_LONG_PROPERTY_NAME = 1, U_PROPERTY_NAME_CHOICE_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn u_hasBinaryProperty_73(c: UChar32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_stringHasBinaryProperty_73(s: *const UChar, length: i32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getBinaryPropertySet_73( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const USet; } -extern "C" { +unsafe extern "C" { pub fn u_isUAlphabetic_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isULowercase_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUUppercase_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUWhiteSpace_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyValue_73(c: UChar32, which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMinValue_73(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMaxValue_73(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMap_73( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const UCPMap; } -extern "C" { +unsafe extern "C" { pub fn u_getNumericValue_73(c: UChar32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn u_islower_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isupper_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_istitle_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdigit_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalpha_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalnum_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isxdigit_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_ispunct_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isgraph_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isblank_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdefined_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isspace_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaSpaceChar_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isWhitespace_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_iscntrl_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isISOControl_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isprint_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isbase_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charDirection_73(c: UChar32) -> UCharDirection; } -extern "C" { +unsafe extern "C" { pub fn u_isMirrored_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charMirror_73(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_getBidiPairedBracket_73(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charType_73(c: UChar32) -> i8; } pub type UCharEnumTypeRange = ::std::option::Option< @@ -956,19 +959,19 @@ pub type UCharEnumTypeRange = ::std::option::Option< type_: UCharCategory, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharTypes_73( enumRange: UCharEnumTypeRange, context: *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn u_getCombiningClass_73(c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn u_charDigitValue_73(c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charName_73( code: UChar32, nameChoice: UCharNameChoice, @@ -977,7 +980,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getISOComment_73( c: UChar32, dest: *mut ::std::os::raw::c_char, @@ -985,7 +988,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charFromName_73( nameChoice: UCharNameChoice, name: *const ::std::os::raw::c_char, @@ -1001,7 +1004,7 @@ pub type UEnumCharNamesFn = ::std::option::Option< length: i32, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharNames_73( start: UChar32, limit: UChar32, @@ -1011,68 +1014,68 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyName_73( property: UProperty, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyEnum_73(alias: *const ::std::os::raw::c_char) -> UProperty; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueName_73( property: UProperty, value: i32, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueEnum_73( property: UProperty, alias: *const ::std::os::raw::c_char, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_isIDStart_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDPart_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDIgnorable_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDStart_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDPart_73(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_tolower_73(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_toupper_73(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_totitle_73(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_foldCase_73(c: UChar32, options: u32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_digit_73(ch: UChar32, radix: i8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_forDigit_73(digit: i32, radix: i8) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charAge_73(c: UChar32, versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getUnicodeVersion_73(versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getFC_NFKC_Closure_73( c: UChar32, dest: *mut UChar, @@ -1080,10 +1083,10 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_close_73(ut: *mut UText) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUTF8_73( ut: *mut UText, s: *const ::std::os::raw::c_char, @@ -1091,7 +1094,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUChars_73( ut: *mut UText, s: *const UChar, @@ -1099,7 +1102,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_clone_73( dest: *mut UText, src: *const UText, @@ -1108,46 +1111,46 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_equals_73(a: *const UText, b: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_nativeLength_73(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_isLengthExpensive_73(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_char32At_73(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_current32_73(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32_73(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32_73(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32From_73(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32From_73(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_getNativeIndex_73(ut: *const UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_setNativeIndex_73(ut: *mut UText, nativeIndex: i64); } -extern "C" { +unsafe extern "C" { pub fn utext_moveIndex32_73(ut: *mut UText, delta: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_getPreviousNativeIndex_73(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_extract_73( ut: *mut UText, nativeStart: i64, @@ -1157,13 +1160,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_isWritable_73(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_hasMetaData_73(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_replace_73( ut: *mut UText, nativeStart: i64, @@ -1173,7 +1176,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_copy_73( ut: *mut UText, nativeStart: i64, @@ -1183,7 +1186,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utext_freeze_73(ut: *mut UText); } pub type UTextClone = ::std::option::Option< @@ -1253,181 +1256,34 @@ pub struct UTextFuncs { pub spare2: UTextClose, pub spare3: UTextClose, } -#[test] -fn bindgen_test_layout_UTextFuncs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UTextFuncs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UTextFuncs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(tableSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(clone) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(nativeLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(access) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(copy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapOffsetToNative) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapOffsetToNative) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapNativeIndexToUTF16) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapNativeIndexToUTF16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare3) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare3) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] pub struct UText { @@ -1456,231 +1312,40 @@ pub struct UText { pub privB: i32, pub privC: i32, } -#[test] -fn bindgen_test_layout_UText() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(UText)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UText)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).providerProperties) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(providerProperties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeOfStruct) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(sizeOfStruct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(extraSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeIndexingLimit) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(nativeIndexingLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeStart) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkContents) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkContents) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFuncs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pFuncs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pExtra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(p)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(q)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(r)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privP) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(a)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(b)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, - 124usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(c)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privA) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privB) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privC) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privC) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; impl Default for UText { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1690,7 +1355,7 @@ impl Default for UText { } } } -extern "C" { +unsafe extern "C" { pub fn utext_setup_73(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; } #[repr(C)] @@ -1706,61 +1371,17 @@ pub struct UParseError { pub preContext: [UChar; 16usize], pub postContext: [UChar; 16usize], } -#[test] -fn bindgen_test_layout_UParseError() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(UParseError)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UParseError)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(preContext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).postContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(postContext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UBreakIteratorType { @@ -1813,7 +1434,7 @@ pub enum USentenceBreakTag { UBRK_SENTENCE_TERM_LIMIT = 100, UBRK_SENTENCE_SEP_LIMIT = 200, } -extern "C" { +unsafe extern "C" { pub fn ubrk_open_73( type_: UBreakIteratorType, locale: *const ::std::os::raw::c_char, @@ -1822,7 +1443,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openRules_73( rules: *const UChar, rulesLength: i32, @@ -1832,7 +1453,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openBinaryRules_73( binaryRules: *const u8, rulesLength: i32, @@ -1841,7 +1462,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_safeClone_73( bi: *const UBreakIterator, stackBuffer: *mut ::std::os::raw::c_void, @@ -1849,14 +1470,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_clone_73(bi: *const UBreakIterator, status: *mut UErrorCode) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_close_73(bi: *mut UBreakIterator); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setText_73( bi: *mut UBreakIterator, text: *const UChar, @@ -1864,43 +1485,43 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setUText_73(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_current_73(bi: *const UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_next_73(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_previous_73(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_first_73(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_last_73(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_preceding_73(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_following_73(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getAvailable_73(index: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_countAvailable_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_isBoundary_73(bi: *mut UBreakIterator, offset: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatus_73(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatusVec_73( bi: *mut UBreakIterator, fillInVec: *mut i32, @@ -1908,17 +1529,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getLocaleByType_73( bi: *const UBreakIterator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_refreshUText_73(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_getBinaryRules_73( bi: *mut UBreakIterator, binaryRules: *mut u8, @@ -2009,7 +1630,7 @@ pub enum USystemTimeZoneType { UCAL_ZONE_TYPE_CANONICAL = 1, UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZoneIDEnumeration_73( zoneType: USystemTimeZoneType, region: *const ::std::os::raw::c_char, @@ -2017,39 +1638,39 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZones_73(ec: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openCountryTimeZones_73( country: *const ::std::os::raw::c_char, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDefaultTimeZone_73( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setDefaultTimeZone_73(zoneID: *const UChar, ec: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_getHostTimeZone_73( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDSTSavings_73(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getNow_73() -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_open_73( zoneID: *const UChar, len: i32, @@ -2058,13 +1679,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_close_73(cal: *mut UCalendar); } -extern "C" { +unsafe extern "C" { pub fn ucal_clone_73(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_setTimeZone_73( cal: *mut UCalendar, zoneID: *const UChar, @@ -2072,7 +1693,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneID_73( cal: *const UCalendar, result: *mut UChar, @@ -2088,7 +1709,7 @@ pub enum UCalendarDisplayNameType { UCAL_DST = 2, UCAL_SHORT_DST = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneDisplayName_73( cal: *const UCalendar, type_: UCalendarDisplayNameType, @@ -2098,17 +1719,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_inDaylightTime_73(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_setGregorianChange_73( cal: *mut UCalendar, date: UDate, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getGregorianChange_73(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; } #[repr(u32)] @@ -2127,25 +1748,25 @@ pub enum UCalendarWallTimeOption { UCAL_WALLTIME_FIRST = 1, UCAL_WALLTIME_NEXT_VALID = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_getAttribute_73(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setAttribute_73(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_getAvailable_73(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_countAvailable_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getMillis_73(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_setMillis_73(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDate_73( cal: *mut UCalendar, year: i32, @@ -2154,7 +1775,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDateTime_73( cal: *mut UCalendar, year: i32, @@ -2166,10 +1787,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_equivalentTo_73(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_add_73( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2177,7 +1798,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_roll_73( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2185,23 +1806,23 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_get_73( cal: *const UCalendar, field: UCalendarDateFields, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_set_73(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_isSet_73(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_clearField_73(cal: *mut UCalendar, field: UCalendarDateFields); } -extern "C" { +unsafe extern "C" { pub fn ucal_clear_73(calendar: *mut UCalendar); } #[repr(u32)] @@ -2214,7 +1835,7 @@ pub enum UCalendarLimitType { UCAL_ACTUAL_MINIMUM = 4, UCAL_ACTUAL_MAXIMUM = 5, } -extern "C" { +unsafe extern "C" { pub fn ucal_getLimit_73( cal: *const UCalendar, field: UCalendarDateFields, @@ -2222,17 +1843,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getLocaleByType_73( cal: *const UCalendar, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTZDataVersion_73(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getCanonicalTimeZoneID_73( id: *const UChar, len: i32, @@ -2242,13 +1863,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getType_73( cal: *const UCalendar, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getKeywordValuesForLocale_73( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -2264,24 +1885,24 @@ pub enum UCalendarWeekdayType { UCAL_WEEKEND_ONSET = 2, UCAL_WEEKEND_CEASE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getDayOfWeekType_73( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> UCalendarWeekdayType; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWeekendTransition_73( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_isWeekend_73(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getFieldDifference_73( cal: *mut UCalendar, target: UDate, @@ -2297,7 +1918,7 @@ pub enum UTimeZoneTransitionType { UCAL_TZ_TRANSITION_PREVIOUS = 2, UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneTransitionDate_73( cal: *const UCalendar, type_: UTimeZoneTransitionType, @@ -2305,7 +1926,7 @@ extern "C" { status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWindowsTimeZoneID_73( id: *const UChar, len: i32, @@ -2314,7 +1935,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneIDForWindowsID_73( winid: *const UChar, len: i32, @@ -2334,7 +1955,7 @@ pub enum UTimeZoneLocalOption { UCAL_TZ_LOCAL_DAYLIGHT_FORMER = 7, UCAL_TZ_LOCAL_DAYLIGHT_LATTER = 15, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneOffsetFromLocal_73( cal: *const UCalendar, nonExistingTimeOpt: UTimeZoneLocalOption, @@ -2344,10 +1965,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_init_73(status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn u_cleanup_73(); } pub type UMemAllocFn = ::std::option::Option< @@ -2366,7 +1987,7 @@ pub type UMemReallocFn = ::std::option::Option< pub type UMemFreeFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), >; -extern "C" { +unsafe extern "C" { pub fn u_setMemoryFunctions_73( context: *const ::std::os::raw::c_void, a: UMemAllocFn, @@ -2386,7 +2007,7 @@ pub type UMtxInitFn = ::std::option::Option< pub type UMtxFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), >; -extern "C" { +unsafe extern "C" { pub fn u_setMutexFunctions_73( context: *const ::std::os::raw::c_void, init: UMtxInitFn, @@ -2399,7 +2020,7 @@ extern "C" { pub type UMtxAtomicFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, >; -extern "C" { +unsafe extern "C" { pub fn u_setAtomicIncDecFunctions_73( context: *const ::std::os::raw::c_void, inc: UMtxAtomicFn, @@ -2434,102 +2055,29 @@ pub struct UConverterFromUnicodeArgs { pub targetLimit: *const ::std::os::raw::c_char, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterFromUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterFromUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2551,102 +2099,28 @@ pub struct UConverterToUnicodeArgs { pub targetLimit: *const UChar, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterToUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterToUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2726,39 +2200,39 @@ pub type UConverterFromUCallback = ::std::option::Option< pErrorCode: *mut UErrorCode, ), >; -extern "C" { +unsafe extern "C" { pub fn ucnv_compareNames_73( name1: *const ::std::os::raw::c_char, name2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ucnv_open_73( converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openU_73(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openCCSID_73( codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openPackage_73( packageName: *const ::std::os::raw::c_char, converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_clone_73(cnv: *const UConverter, status: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_safeClone_73( cnv: *const UConverter, stackBuffer: *mut ::std::os::raw::c_void, @@ -2766,10 +2240,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_close_73(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getSubstChars_73( converter: *const UConverter, subChars: *mut ::std::os::raw::c_char, @@ -2777,7 +2251,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstChars_73( converter: *mut UConverter, subChars: *const ::std::os::raw::c_char, @@ -2785,7 +2259,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstString_73( cnv: *mut UConverter, s: *const UChar, @@ -2793,7 +2267,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidChars_73( converter: *const UConverter, errBytes: *mut ::std::os::raw::c_char, @@ -2801,7 +2275,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidUChars_73( converter: *const UConverter, errUChars: *mut UChar, @@ -2809,22 +2283,22 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_reset_73(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetToUnicode_73(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetFromUnicode_73(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMaxCharSize_73(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMinCharSize_73(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDisplayName_73( converter: *const UConverter, displayLocale: *const ::std::os::raw::c_char, @@ -2833,25 +2307,25 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getName_73( converter: *const UConverter, err: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCCSID_73(converter: *const UConverter, err: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getPlatform_73( converter: *const UConverter, err: *mut UErrorCode, ) -> UConverterPlatform; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getType_73(converter: *const UConverter) -> UConverterType; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStarters_73( converter: *const UConverter, starters: *mut UBool, @@ -2865,7 +2339,7 @@ pub enum UConverterUnicodeSet { UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, UCNV_SET_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn ucnv_getUnicodeSet_73( cnv: *const UConverter, setFillIn: *mut USet, @@ -2873,21 +2347,21 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getToUCallBack_73( converter: *const UConverter, action: *mut UConverterToUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getFromUCallBack_73( converter: *const UConverter, action: *mut UConverterFromUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setToUCallBack_73( converter: *mut UConverter, newAction: UConverterToUCallback, @@ -2897,7 +2371,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFromUCallBack_73( converter: *mut UConverter, newAction: UConverterFromUCallback, @@ -2907,7 +2381,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUnicode_73( converter: *mut UConverter, target: *mut *mut ::std::os::raw::c_char, @@ -2919,7 +2393,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUnicode_73( converter: *mut UConverter, target: *mut *mut UChar, @@ -2931,7 +2405,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUChars_73( cnv: *mut UConverter, dest: *mut ::std::os::raw::c_char, @@ -2941,7 +2415,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUChars_73( cnv: *mut UConverter, dest: *mut UChar, @@ -2951,7 +2425,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getNextUChar_73( converter: *mut UConverter, source: *mut *const ::std::os::raw::c_char, @@ -2959,7 +2433,7 @@ extern "C" { err: *mut UErrorCode, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_convertEx_73( targetCnv: *mut UConverter, sourceCnv: *mut UConverter, @@ -2976,7 +2450,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_convert_73( toConverterName: *const ::std::os::raw::c_char, fromConverterName: *const ::std::os::raw::c_char, @@ -2987,7 +2461,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toAlgorithmic_73( algorithmicType: UConverterType, cnv: *mut UConverter, @@ -2998,7 +2472,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromAlgorithmic_73( cnv: *mut UConverter, algorithmicType: UConverterType, @@ -3009,87 +2483,87 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_flushCache_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAvailable_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAvailableName_73(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openAllNames_73(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAliases_73( alias: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAlias_73( alias: *const ::std::os::raw::c_char, n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAliases_73( alias: *const ::std::os::raw::c_char, aliases: *mut *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_openStandardNames_73( convName: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countStandards_73() -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandard_73( n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandardName_73( name: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCanonicalName_73( alias: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDefaultName_73() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setDefaultName_73(name: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fixFileSeparator_73(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); } -extern "C" { +unsafe extern "C" { pub fn ucnv_isAmbiguous_73(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFallback_73(cnv: *mut UConverter, usesFallback: UBool); } -extern "C" { +unsafe extern "C" { pub fn ucnv_usesFallback_73(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_detectUnicodeSignature_73( source: *const ::std::os::raw::c_char, sourceLength: i32, @@ -3097,13 +2571,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUCountPending_73(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUCountPending_73(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_isFixedWidth_73(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; } #[repr(u32)] @@ -3158,181 +2632,42 @@ pub struct UCharIterator { pub getState: UCharIteratorGetState, pub setState: UCharIteratorSetState, } -#[test] -fn bindgen_test_layout_UCharIterator() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UCharIterator)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCharIterator)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedField) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedField) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).move_) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasNext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasPrevious) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasPrevious) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(current) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).previous) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(previous) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedFn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedFn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getState) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setState) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(setState) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; impl Default for UCharIterator { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3362,22 +2697,22 @@ pub enum UNormalizationCheckResult { pub struct UNormalizer2 { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFCInstance_73(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFDInstance_73(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCInstance_73(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKDInstance_73(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCCasefoldInstance_73(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getInstance_73( packageName: *const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char, @@ -3385,17 +2720,17 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_openFiltered_73( norm2: *const UNormalizer2, filterSet: *const USet, pErrorCode: *mut UErrorCode, ) -> *mut UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_close_73(norm2: *mut UNormalizer2); } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalize_73( norm2: *const UNormalizer2, src: *const UChar, @@ -3405,7 +2740,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalizeSecondAndAppend_73( norm2: *const UNormalizer2, first: *mut UChar, @@ -3416,7 +2751,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_append_73( norm2: *const UNormalizer2, first: *mut UChar, @@ -3427,7 +2762,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getDecomposition_73( norm2: *const UNormalizer2, c: UChar32, @@ -3436,7 +2771,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getRawDecomposition_73( norm2: *const UNormalizer2, c: UChar32, @@ -3445,13 +2780,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_composePair_73(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getCombiningClass_73(norm2: *const UNormalizer2, c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isNormalized_73( norm2: *const UNormalizer2, s: *const UChar, @@ -3459,7 +2794,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_quickCheck_73( norm2: *const UNormalizer2, s: *const UChar, @@ -3467,7 +2802,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UNormalizationCheckResult; } -extern "C" { +unsafe extern "C" { pub fn unorm2_spanQuickCheckYes_73( norm2: *const UNormalizer2, s: *const UChar, @@ -3475,13 +2810,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryBefore_73(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryAfter_73(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isInert_73(norm2: *const UNormalizer2, c: UChar32) -> UBool; } impl UNormalizationMode { @@ -3577,13 +2912,13 @@ pub enum UColRuleOption { UCOL_TAILORING_ONLY = 0, UCOL_FULL_RULES = 1, } -extern "C" { +unsafe extern "C" { pub fn ucol_open_73( loc: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openRules_73( rules: *const UChar, rulesLength: i32, @@ -3593,7 +2928,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openFromShortString_73( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3601,14 +2936,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractions_73( coll: *const UCollator, conts: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractionsAndExpansions_73( coll: *const UCollator, contractions: *mut USet, @@ -3617,10 +2952,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_close_73(coll: *mut UCollator); } -extern "C" { +unsafe extern "C" { pub fn ucol_strcoll_73( coll: *const UCollator, source: *const UChar, @@ -3629,7 +2964,7 @@ extern "C" { targetLength: i32, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollUTF8_73( coll: *const UCollator, source: *const ::std::os::raw::c_char, @@ -3639,7 +2974,7 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_greater_73( coll: *const UCollator, source: *const UChar, @@ -3648,7 +2983,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_greaterOrEqual_73( coll: *const UCollator, source: *const UChar, @@ -3657,7 +2992,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_equal_73( coll: *const UCollator, source: *const UChar, @@ -3666,7 +3001,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollIter_73( coll: *const UCollator, sIter: *mut UCharIterator, @@ -3674,13 +3009,13 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_getStrength_73(coll: *const UCollator) -> UCollationStrength; } -extern "C" { +unsafe extern "C" { pub fn ucol_setStrength_73(coll: *mut UCollator, strength: UCollationStrength); } -extern "C" { +unsafe extern "C" { pub fn ucol_getReorderCodes_73( coll: *const UCollator, dest: *mut i32, @@ -3688,7 +3023,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setReorderCodes_73( coll: *mut UCollator, reorderCodes: *const i32, @@ -3696,7 +3031,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getEquivalentReorderCodes_73( reorderCode: i32, dest: *mut i32, @@ -3704,7 +3039,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getDisplayName_73( objLoc: *const ::std::os::raw::c_char, dispLoc: *const ::std::os::raw::c_char, @@ -3713,25 +3048,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getAvailable_73(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_countAvailable_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openAvailableLocales_73(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywords_73(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValues_73( keyword: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValuesForLocale_73( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -3739,7 +3074,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getFunctionalEquivalent_73( result: *mut ::std::os::raw::c_char, resultCapacity: i32, @@ -3749,10 +3084,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRules_73(coll: *const UCollator, length: *mut i32) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ucol_getShortDefinitionString_73( coll: *const UCollator, locale: *const ::std::os::raw::c_char, @@ -3761,7 +3096,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_normalizeShortDefinitionString_73( source: *const ::std::os::raw::c_char, destination: *mut ::std::os::raw::c_char, @@ -3770,7 +3105,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getSortKey_73( coll: *const UCollator, source: *const UChar, @@ -3779,7 +3114,7 @@ extern "C" { resultLength: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_nextSortKeyPart_73( coll: *const UCollator, iter: *mut UCharIterator, @@ -3797,7 +3132,7 @@ pub enum UColBoundMode { UCOL_BOUND_UPPER_LONG = 2, UCOL_BOUND_VALUE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn ucol_getBound_73( source: *const u8, sourceLength: i32, @@ -3808,13 +3143,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVersion_73(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_getUCAVersion_73(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_mergeSortkeys_73( src1: *const u8, src1Length: i32, @@ -3824,7 +3159,7 @@ extern "C" { destCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setAttribute_73( coll: *mut UCollator, attr: UColAttribute, @@ -3832,24 +3167,24 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getAttribute_73( coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode, ) -> UColAttributeValue; } -extern "C" { +unsafe extern "C" { pub fn ucol_setMaxVariable_73( coll: *mut UCollator, group: UColReorderCode, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getMaxVariable_73(coll: *const UCollator) -> UColReorderCode; } -extern "C" { +unsafe extern "C" { pub fn ucol_setVariableTop_73( coll: *mut UCollator, varTop: *const UChar, @@ -3857,16 +3192,16 @@ extern "C" { status: *mut UErrorCode, ) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVariableTop_73(coll: *const UCollator, status: *mut UErrorCode) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_restoreVariableTop_73(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucol_clone_73(coll: *const UCollator, status: *mut UErrorCode) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_safeClone_73( coll: *const UCollator, stackBuffer: *mut ::std::os::raw::c_void, @@ -3874,7 +3209,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRulesEx_73( coll: *const UCollator, delta: UColRuleOption, @@ -3882,31 +3217,31 @@ extern "C" { bufferLen: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocale_73( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocaleByType_73( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getTailoredSet_73(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn ucol_getUnsafeSet_73( coll: *const UCollator, unsafe_: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_prepareShortStringOpen_73( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3914,7 +3249,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_cloneBinary_73( coll: *const UCollator, buffer: *mut u8, @@ -3922,7 +3257,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openBinary_73( bin: *const u8, length: i32, @@ -3940,13 +3275,13 @@ pub struct UCharsetDetector { pub struct UCharsetMatch { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ucsdet_open_73(status: *mut UErrorCode) -> *mut UCharsetDetector; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_close_73(ucsd: *mut UCharsetDetector); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setText_73( ucsd: *mut UCharsetDetector, textIn: *const ::std::os::raw::c_char, @@ -3954,7 +3289,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDeclaredEncoding_73( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3962,35 +3297,35 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detect_73( ucsd: *mut UCharsetDetector, status: *mut UErrorCode, ) -> *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detectAll_73( ucsd: *mut UCharsetDetector, matchesFound: *mut i32, status: *mut UErrorCode, ) -> *mut *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getName_73( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getConfidence_73(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getLanguage_73( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getUChars_73( ucsm: *const UCharsetMatch, buf: *mut UChar, @@ -3998,25 +3333,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getAllDetectableCharsets_73( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_isInputFilterEnabled_73(ucsd: *const UCharsetDetector) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_enableInputFilter_73(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getDetectableCharsets_73( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDetectableCharset_73( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -4031,51 +3366,17 @@ pub struct UFieldPosition { pub beginIndex: i32, pub endIndex: i32, } -#[test] -fn bindgen_test_layout_UFieldPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(UFieldPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UFieldPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(field) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).beginIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(beginIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).endIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(endIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UFormattableType { @@ -4089,54 +3390,54 @@ pub enum UFormattableType { UFMT_COUNT = 7, } pub type UFormattable = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn ufmt_open_73(status: *mut UErrorCode) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_close_73(fmt: *mut UFormattable); } -extern "C" { +unsafe extern "C" { pub fn ufmt_getType_73(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; } -extern "C" { +unsafe extern "C" { pub fn ufmt_isNumeric_73(fmt: *const UFormattable) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDate_73(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDouble_73(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getLong_73(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getInt64_73(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getObject_73( fmt: *const UFormattable, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getUChars_73( fmt: *mut UFormattable, len: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayLength_73(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayItemByIndex_73( fmt: *mut UFormattable, n: i32, status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDecNumChars_73( fmt: *mut UFormattable, len: *mut i32, @@ -4171,13 +3472,13 @@ pub enum UDisplayContext { pub struct UFieldPositionIterator { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_open_73(status: *mut UErrorCode) -> *mut UFieldPositionIterator; } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_close_73(fpositer: *mut UFieldPositionIterator); } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_next_73( fpositer: *mut UFieldPositionIterator, beginIndex: *mut i32, @@ -4213,7 +3514,7 @@ pub enum UNumberFormatStyle { UNUM_CURRENCY_STANDARD = 16, UNUM_FORMAT_STYLE_COUNT = 17, } -extern "C" { +unsafe extern "C" { pub fn unum_open_73( style: UNumberFormatStyle, pattern: *const UChar, @@ -4223,13 +3524,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_close_73(fmt: *mut UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn unum_clone_73(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_format_73( fmt: *const UNumberFormat, number: i32, @@ -4239,7 +3540,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatInt64_73( fmt: *const UNumberFormat, number: i64, @@ -4249,7 +3550,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDouble_73( fmt: *const UNumberFormat, number: f64, @@ -4259,7 +3560,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleForFields_73( format: *const UNumberFormat, number: f64, @@ -4269,7 +3570,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDecimal_73( fmt: *const UNumberFormat, number: *const ::std::os::raw::c_char, @@ -4280,7 +3581,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleCurrency_73( fmt: *const UNumberFormat, number: f64, @@ -4291,7 +3592,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatUFormattable_73( fmt: *const UNumberFormat, number: *const UFormattable, @@ -4301,7 +3602,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parse_73( fmt: *const UNumberFormat, text: *const UChar, @@ -4310,7 +3611,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseInt64_73( fmt: *const UNumberFormat, text: *const UChar, @@ -4319,7 +3620,7 @@ extern "C" { status: *mut UErrorCode, ) -> i64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDouble_73( fmt: *const UNumberFormat, text: *const UChar, @@ -4328,7 +3629,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDecimal_73( fmt: *const UNumberFormat, text: *const UChar, @@ -4339,7 +3640,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDoubleCurrency_73( fmt: *const UNumberFormat, text: *const UChar, @@ -4349,7 +3650,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseToUFormattable_73( fmt: *const UNumberFormat, result: *mut UFormattable, @@ -4359,7 +3660,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn unum_applyPattern_73( format: *mut UNumberFormat, localized: UBool, @@ -4369,10 +3670,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getAvailable_73(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_countAvailable_73() -> i32; } #[repr(u32)] @@ -4410,26 +3711,26 @@ pub enum UNumberFormatAttribute { UNUM_SIGN_ALWAYS_SHOWN = 4100, UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 4101, } -extern "C" { +unsafe extern "C" { pub fn unum_hasAttribute_73(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> bool; } -extern "C" { +unsafe extern "C" { pub fn unum_getAttribute_73(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setAttribute_73( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, newValue: i32, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getDoubleAttribute_73( fmt: *const UNumberFormat, attr: UNumberFormatAttribute, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_setDoubleAttribute_73( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, @@ -4448,7 +3749,7 @@ pub enum UNumberFormatTextAttribute { UNUM_DEFAULT_RULESET = 6, UNUM_PUBLIC_RULESETS = 7, } -extern "C" { +unsafe extern "C" { pub fn unum_getTextAttribute_73( fmt: *const UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4457,7 +3758,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setTextAttribute_73( fmt: *mut UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4466,7 +3767,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_toPattern_73( fmt: *const UNumberFormat, isPatternLocalized: UBool, @@ -4509,7 +3810,7 @@ pub enum UNumberFormatSymbol { UNUM_APPROXIMATELY_SIGN_SYMBOL = 28, UNUM_FORMAT_SYMBOL_COUNT = 29, } -extern "C" { +unsafe extern "C" { pub fn unum_getSymbol_73( fmt: *const UNumberFormat, symbol: UNumberFormatSymbol, @@ -4518,7 +3819,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setSymbol_73( fmt: *mut UNumberFormat, symbol: UNumberFormatSymbol, @@ -4527,21 +3828,21 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getLocaleByType_73( fmt: *const UNumberFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_setContext_73( fmt: *mut UNumberFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getContext_73( fmt: *const UNumberFormat, type_: UDisplayContextType, @@ -4615,10 +3916,10 @@ pub enum UDateFormatField { UDAT_TIME_SEPARATOR_FIELD = 37, UDAT_FIELD_COUNT = 38, } -extern "C" { +unsafe extern "C" { pub fn udat_toCalendarDateField_73(field: UDateFormatField) -> UCalendarDateFields; } -extern "C" { +unsafe extern "C" { pub fn udat_open_73( timeStyle: UDateFormatStyle, dateStyle: UDateFormatStyle, @@ -4630,7 +3931,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_close_73(format: *mut UDateFormat); } #[repr(u32)] @@ -4642,14 +3943,14 @@ pub enum UDateFormatBooleanAttribute { UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udat_getBooleanAttribute_73( fmt: *const UDateFormat, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setBooleanAttribute_73( fmt: *mut UDateFormat, attr: UDateFormatBooleanAttribute, @@ -4665,10 +3966,10 @@ pub enum UDateFormatHourCycle { UDAT_HOUR_CYCLE_23 = 2, UDAT_HOUR_CYCLE_24 = 3, } -extern "C" { +unsafe extern "C" { pub fn udat_clone_73(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_format_73( format: *const UDateFormat, dateToFormat: UDate, @@ -4678,7 +3979,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendar_73( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4688,7 +3989,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatForFields_73( format: *const UDateFormat, dateToFormat: UDate, @@ -4698,7 +3999,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendarForFields_73( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4708,7 +4009,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_parse_73( format: *const UDateFormat, text: *const UChar, @@ -4717,7 +4018,7 @@ extern "C" { status: *mut UErrorCode, ) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_parseCalendar_73( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4727,28 +4028,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_isLenient_73(fmt: *const UDateFormat) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setLenient_73(fmt: *mut UDateFormat, isLenient: UBool); } -extern "C" { +unsafe extern "C" { pub fn udat_getCalendar_73(fmt: *const UDateFormat) -> *const UCalendar; } -extern "C" { +unsafe extern "C" { pub fn udat_setCalendar_73(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormat_73(fmt: *const UDateFormat) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormatForField_73( fmt: *const UDateFormat, field: UChar, ) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormatForFields_73( fmt: *mut UDateFormat, fields: *const UChar, @@ -4756,28 +4057,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_setNumberFormat_73(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormat_73( fmt: *mut UDateFormat, numberFormatToAdopt: *mut UNumberFormat, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getAvailable_73(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_countAvailable_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_get2DigitYearStart_73(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_set2DigitYearStart_73(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_toPattern_73( fmt: *const UDateFormat, localized: UBool, @@ -4786,7 +4087,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPattern_73( format: *mut UDateFormat, localized: UBool, @@ -4833,7 +4134,7 @@ pub enum UDateFormatSymbolType { pub struct UDateFormatSymbols { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn udat_getSymbols_73( fmt: *const UDateFormat, type_: UDateFormatSymbolType, @@ -4843,10 +4144,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_countSymbols_73(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_setSymbols_73( format: *mut UDateFormat, type_: UDateFormatSymbolType, @@ -4856,28 +4157,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getLocaleByType_73( fmt: *const UDateFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_setContext_73( fmt: *mut UDateFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getContext_73( fmt: *const UDateFormat, type_: UDisplayContextType, status: *mut UErrorCode, ) -> UDisplayContext; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeDate_73( fmt: *const UDateFormat, result: *mut UChar, @@ -4885,7 +4186,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeTime_73( fmt: *const UDateFormat, result: *mut UChar, @@ -4893,7 +4194,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPatternRelative_73( format: *mut UDateFormat, datePattern: *const UChar, @@ -4915,10 +4216,10 @@ pub type UDateFormatOpener = ::std::option::Option< status: *mut UErrorCode, ) -> *mut UDateFormat, >; -extern "C" { +unsafe extern "C" { pub fn udat_registerOpener_73(opener: UDateFormatOpener, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_unregisterOpener_73( opener: UDateFormatOpener, status: *mut UErrorCode, @@ -4970,25 +4271,25 @@ pub enum UDateTimePatternConflict { UDATPG_CONFLICT = 2, UDATPG_CONFLICT_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn udatpg_open_73( locale: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openEmpty_73(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_close_73(dtpg: *mut UDateTimePatternGenerator); } -extern "C" { +unsafe extern "C" { pub fn udatpg_clone_73( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPattern_73( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -4998,7 +4299,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPatternWithOptions_73( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -5009,7 +4310,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getSkeleton_73( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5019,7 +4320,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBaseSkeleton_73( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5029,7 +4330,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_addPattern_73( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5041,7 +4342,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UDateTimePatternConflict; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemFormat_73( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5049,14 +4350,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemFormat_73( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemName_73( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5064,14 +4365,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemName_73( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getFieldDisplayName_73( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5081,20 +4382,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormat_73( dtpg: *const UDateTimePatternGenerator, dtFormat: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormat_73( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormatForStyle_73( udtpg: *mut UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5103,7 +4404,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormatForStyle_73( udtpg: *const UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5111,20 +4412,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDecimal_73( dtpg: *mut UDateTimePatternGenerator, decimal: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDecimal_73( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypes_73( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5136,7 +4437,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypesWithOptions_73( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5149,19 +4450,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openSkeletons_73( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openBaseSkeletons_73( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getPatternForSkeleton_73( dtpg: *const UDateTimePatternGenerator, skeleton: *const UChar, @@ -5169,7 +4470,7 @@ extern "C" { pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDefaultHourCycle_73( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, @@ -5188,111 +4489,28 @@ pub struct UDataInfo { pub formatVersion: [u8; 4usize], pub dataVersion: [u8; 4usize], } -#[test] -fn bindgen_test_layout_UDataInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(UDataInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(UDataInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedWord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isBigEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(isBigEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charsetFamily) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(charsetFamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeofUChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(sizeofUChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedByte) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedByte) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataFormat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataFormat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formatVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(formatVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UDataMemory { @@ -5306,7 +4524,7 @@ pub type UDataMemoryIsAcceptable = ::std::option::Option< pInfo: *const UDataInfo, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn udata_open_73( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5314,7 +4532,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_openChoice_73( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5324,19 +4542,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_close_73(pData: *mut UDataMemory); } -extern "C" { +unsafe extern "C" { pub fn udata_getMemory_73(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn udata_getInfo_73(pData: *mut UDataMemory, pInfo: *mut UDataInfo); } -extern "C" { +unsafe extern "C" { pub fn udata_setCommonData_73(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udata_setAppData_73( packageName: *const ::std::os::raw::c_char, data: *const ::std::os::raw::c_void, @@ -5355,7 +4573,7 @@ pub enum UDataFileAccess { UDATA_NO_FILES = 3, UDATA_FILE_ACCESS_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udata_setFileAccess_73(access: UDataFileAccess, status: *mut UErrorCode); } #[repr(u32)] @@ -5407,13 +4625,13 @@ pub enum UListFormatterWidth { ULISTFMT_WIDTH_SHORT = 1, ULISTFMT_WIDTH_NARROW = 2, } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_open_73( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openForType_73( locale: *const ::std::os::raw::c_char, type_: UListFormatterType, @@ -5421,22 +4639,22 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_close_73(listfmt: *mut UListFormatter); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openResult_73(ec: *mut UErrorCode) -> *mut UFormattedList; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_resultAsValue_73( uresult: *const UFormattedList, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_closeResult_73(uresult: *mut UFormattedList); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_format_73( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5447,7 +4665,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_formatStringsToResult_73( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5458,7 +4676,7 @@ extern "C" { ); } pub type va_list = __builtin_va_list; -extern "C" { +unsafe extern "C" { pub fn u_formatMessage_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5469,7 +4687,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessage_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5480,7 +4698,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessage_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5491,7 +4709,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessage_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5502,7 +4720,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_formatMessageWithError_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5514,7 +4732,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessageWithError_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5526,7 +4744,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessageWithError_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5538,7 +4756,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessageWithError_73( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5551,7 +4769,7 @@ extern "C" { ); } pub type UMessageFormat = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn umsg_open_73( pattern: *const UChar, patternLength: i32, @@ -5560,19 +4778,19 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_close_73(format: *mut UMessageFormat); } -extern "C" { +unsafe extern "C" { pub fn umsg_clone_73(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_setLocale_73(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn umsg_getLocale_73(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn umsg_applyPattern_73( fmt: *mut UMessageFormat, pattern: *const UChar, @@ -5581,7 +4799,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_toPattern_73( fmt: *const UMessageFormat, result: *mut UChar, @@ -5589,7 +4807,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_format_73( fmt: *const UMessageFormat, result: *mut UChar, @@ -5598,7 +4816,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_vformat_73( fmt: *const UMessageFormat, result: *mut UChar, @@ -5607,7 +4825,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_parse_73( fmt: *const UMessageFormat, source: *const UChar, @@ -5617,7 +4835,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn umsg_vparse_73( fmt: *const UMessageFormat, source: *const UChar, @@ -5627,7 +4845,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_autoQuoteApostrophe_73( pattern: *const UChar, patternLength: i32, @@ -5641,16 +4859,16 @@ extern "C" { pub struct UFormattedNumber { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openResult_73(ec: *mut UErrorCode) -> *mut UFormattedNumber; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultAsValue_73( uresult: *const UFormattedNumber, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToString_73( uresult: *const UFormattedNumber, buffer: *mut UChar, @@ -5658,21 +4876,21 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultNextFieldPosition_73( uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultGetAllFieldPositions_73( uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToDecimalNumber_73( uresult: *const UFormattedNumber, dest: *mut ::std::os::raw::c_char, @@ -5680,7 +4898,7 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_closeResult_73(uresult: *mut UFormattedNumber); } #[repr(C)] @@ -5688,7 +4906,7 @@ extern "C" { pub struct UNumberFormatter { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocale_73( skeleton: *const UChar, skeletonLen: i32, @@ -5696,7 +4914,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocaleWithError_73( skeleton: *const UChar, skeletonLen: i32, @@ -5705,7 +4923,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_formatInt_73( uformatter: *const UNumberFormatter, value: i64, @@ -5713,7 +4931,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDouble_73( uformatter: *const UNumberFormatter, value: f64, @@ -5721,7 +4939,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDecimal_73( uformatter: *const UNumberFormatter, value: *const ::std::os::raw::c_char, @@ -5730,7 +4948,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_close_73(uformatter: *mut UNumberFormatter); } #[repr(C)] @@ -5750,23 +4968,23 @@ pub enum UPluralType { pub struct UPluralRules { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uplrules_open_73( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_openForType_73( locale: *const ::std::os::raw::c_char, type_: UPluralType, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_close_73(uplrules: *mut UPluralRules); } -extern "C" { +unsafe extern "C" { pub fn uplrules_select_73( uplrules: *const UPluralRules, number: f64, @@ -5775,7 +4993,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectFormatted_73( uplrules: *const UPluralRules, number: *const UFormattedNumber, @@ -5784,7 +5002,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectForRange_73( uplrules: *const UPluralRules, urange: *const UFormattedNumberRange, @@ -5793,7 +5011,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectWithFormat_73( uplrules: *const UPluralRules, number: f64, @@ -5803,53 +5021,53 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_getKeywords_73( uplrules: *const UPluralRules, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn u_getDataDirectory_73() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setDataDirectory_73(directory: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_73(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_73( path: *const ::std::os::raw::c_char, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_charsToUChars_73(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_UCharsToChars_73(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_strlen_73(s: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_countChar32_73(s: *const UChar, length: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strHasMoreChar32Than_73(s: *const UChar, length: i32, number: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_strcat_73(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncat_73(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strstr_73(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindFirst_73( s: *const UChar, length: i32, @@ -5857,16 +5075,16 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr_73(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr32_73(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrstr_73(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindLast_73( s: *const UChar, length: i32, @@ -5874,35 +5092,35 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr_73(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr32_73(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strpbrk_73(string: *const UChar, matchSet: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcspn_73(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strspn_73(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strtok_r_73( src: *mut UChar, delim: *const UChar, saveState: *mut *mut UChar, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcmp_73(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcmpCodePointOrder_73(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompare_73( s1: *const UChar, length1: i32, @@ -5911,14 +5129,14 @@ extern "C" { codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompareIter_73( iter1: *mut UCharIterator, iter2: *mut UCharIterator, codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCaseCompare_73( s1: *const UChar, length1: i32, @@ -5928,78 +5146,78 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmp_73(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmpCodePointOrder_73(s1: *const UChar, s2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcasecmp_73(s1: *const UChar, s2: *const UChar, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncasecmp_73(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcasecmp_73(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcpy_73(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncpy_73(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrcpy_73(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrncpy_73( dst: *mut UChar, src: *const ::std::os::raw::c_char, n: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_austrcpy_73( dst: *mut ::std::os::raw::c_char, src: *const UChar, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_austrncpy_73( dst: *mut ::std::os::raw::c_char, src: *const UChar, n: i32, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_memcpy_73(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memmove_73(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memset_73(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memcmp_73(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcmpCodePointOrder_73(s1: *const UChar, s2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memchr_73(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memchr32_73(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr_73(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr32_73(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_unescape_73( src: *const ::std::os::raw::c_char, dest: *mut UChar, @@ -6009,7 +5227,7 @@ extern "C" { pub type UNESCAPE_CHAR_AT = ::std::option::Option< unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, >; -extern "C" { +unsafe extern "C" { pub fn u_unescapeAt_73( charAt: UNESCAPE_CHAR_AT, offset: *mut i32, @@ -6017,7 +5235,7 @@ extern "C" { context: *mut ::std::os::raw::c_void, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strToUpper_73( dest: *mut UChar, destCapacity: i32, @@ -6027,7 +5245,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToLower_73( dest: *mut UChar, destCapacity: i32, @@ -6037,7 +5255,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToTitle_73( dest: *mut UChar, destCapacity: i32, @@ -6048,7 +5266,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strFoldCase_73( dest: *mut UChar, destCapacity: i32, @@ -6058,7 +5276,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToWCS_73( dest: *mut wchar_t, destCapacity: i32, @@ -6068,7 +5286,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut wchar_t; } -extern "C" { +unsafe extern "C" { pub fn u_strFromWCS_73( dest: *mut UChar, destCapacity: i32, @@ -6078,7 +5296,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8_73( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6088,7 +5306,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8_73( dest: *mut UChar, destCapacity: i32, @@ -6098,7 +5316,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8WithSub_73( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6110,7 +5328,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8WithSub_73( dest: *mut UChar, destCapacity: i32, @@ -6122,7 +5340,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8Lenient_73( dest: *mut UChar, destCapacity: i32, @@ -6132,7 +5350,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32_73( dest: *mut UChar32, destCapacity: i32, @@ -6142,7 +5360,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32_73( dest: *mut UChar, destCapacity: i32, @@ -6152,7 +5370,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32WithSub_73( dest: *mut UChar32, destCapacity: i32, @@ -6164,7 +5382,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32WithSub_73( dest: *mut UChar, destCapacity: i32, @@ -6176,7 +5394,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToJavaModifiedUTF8_73( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6186,7 +5404,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromJavaModifiedUTF8WithSub_73( dest: *mut UChar, destCapacity: i32, @@ -6224,82 +5442,24 @@ pub struct UReplaceableCallbacks { unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), >, } -#[test] -fn bindgen_test_layout_UReplaceableCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charAt) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(charAt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).char32At) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(char32At) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(copy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; pub type UTransliterator = *mut ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] @@ -6315,62 +5475,20 @@ pub struct UTransPosition { pub start: i32, pub limit: i32, } -#[test] -fn bindgen_test_layout_UTransPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(UTransPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UTransPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextLimit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(limit) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { pub fn utrans_openU_73( id: *const UChar, idLength: i32, @@ -6381,34 +5499,34 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_openInverse_73( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_clone_73( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_close_73(trans: *mut UTransliterator); } -extern "C" { +unsafe extern "C" { pub fn utrans_getUnicodeID_73( trans: *const UTransliterator, resultLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn utrans_register_73(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn utrans_unregisterID_73(id: *const UChar, idLength: i32); } -extern "C" { +unsafe extern "C" { pub fn utrans_setFilter_73( trans: *mut UTransliterator, filterPattern: *const UChar, @@ -6416,13 +5534,13 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_countAvailableIDs_73() -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_openIDs_73(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn utrans_trans_73( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6432,7 +5550,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncremental_73( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6441,7 +5559,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transUChars_73( trans: *const UTransliterator, text: *mut UChar, @@ -6452,7 +5570,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncrementalUChars_73( trans: *const UTransliterator, text: *mut UChar, @@ -6462,7 +5580,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_toRules_73( trans: *const UTransliterator, escapeUnprintable: UBool, @@ -6471,7 +5589,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_getSourceSet_73( trans: *const UTransliterator, ignoreFilter: UBool, @@ -6479,7 +5597,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn utrans_open_73( id: *const ::std::os::raw::c_char, dir: UTransDirection, @@ -6489,17 +5607,17 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_getID_73( trans: *const UTransliterator, buf: *mut ::std::os::raw::c_char, bufCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_unregister_73(id: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn utrans_getAvailableID_73( index: i32, buf: *mut ::std::os::raw::c_char, @@ -6514,61 +5632,15 @@ pub union UCPTrieData { pub ptr32: *const u32, pub ptr8: *const u8, } -#[test] -fn bindgen_test_layout_UCPTrieData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(UCPTrieData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrieData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr16) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr8) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; impl Default for UCPTrieData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6595,151 +5667,28 @@ pub struct UCPTrie { pub dataNullOffset: i32, pub nullValue: u32, } -#[test] -fn bindgen_test_layout_UCPTrie() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UCPTrie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrie)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).indexLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(indexLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).highStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(highStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shifted12HighStart) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(shifted12HighStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valueWidth) as usize - ptr as usize }, - 31usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(valueWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved32) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index3NullOffset) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index3NullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataNullOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataNullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nullValue) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(nullValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; impl Default for UCPTrie { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6764,7 +5713,7 @@ pub enum UCPTrieValueWidth { UCPTRIE_VALUE_BITS_32 = 1, UCPTRIE_VALUE_BITS_8 = 2, } -extern "C" { +unsafe extern "C" { pub fn ucptrie_openFromBinary_73( type_: UCPTrieType, valueWidth: UCPTrieValueWidth, @@ -6774,19 +5723,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UCPTrie; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_close_73(trie: *mut UCPTrie); } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getType_73(trie: *const UCPTrie) -> UCPTrieType; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getValueWidth_73(trie: *const UCPTrie) -> UCPTrieValueWidth; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_get_73(trie: *const UCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getRange_73( trie: *const UCPTrie, start: UChar32, @@ -6797,7 +5746,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_toBinary_73( trie: *const UCPTrie, data: *mut ::std::os::raw::c_void, @@ -6805,13 +5754,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallIndex_73(trie: *const UCPTrie, c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallU8Index_73(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalU8PrevIndex_73( trie: *const UCPTrie, c: UChar32, @@ -6824,38 +5773,38 @@ extern "C" { pub struct UMutableCPTrie { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_open_73( initialValue: u32, errorValue: u32, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_clone_73( other: *const UMutableCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_close_73(trie: *mut UMutableCPTrie); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPMap_73( map: *const UCPMap, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPTrie_73( trie: *const UCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_get_73(trie: *const UMutableCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_getRange_73( trie: *const UMutableCPTrie, start: UChar32, @@ -6866,7 +5815,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_set_73( trie: *mut UMutableCPTrie, c: UChar32, @@ -6874,7 +5823,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_setRange_73( trie: *mut UMutableCPTrie, start: UChar32, @@ -6883,7 +5832,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_buildImmutable_73( trie: *mut UMutableCPTrie, type_: UCPTrieType, @@ -6900,61 +5849,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); diff --git a/rust_icu_sys/bindgen/lib_74.rs b/rust_icu_sys/bindgen/lib_74.rs index 2b4ba4f..daf9f15 100644 --- a/rust_icu_sys/bindgen/lib_74.rs +++ b/rust_icu_sys/bindgen/lib_74.rs @@ -1,23 +1,26 @@ -/* automatically generated by rust-bindgen 0.66.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type UBool = i8; pub type UChar = u16; pub type UChar32 = i32; pub type UVersionInfo = [u8; 4usize]; -extern "C" { +unsafe extern "C" { pub fn u_versionFromString_74( versionArray: *mut u8, versionString: *const ::std::os::raw::c_char, ); } -extern "C" { +unsafe extern "C" { pub fn u_versionFromUString_74(versionArray: *mut u8, versionString: *const UChar); } -extern "C" { - pub fn u_versionToString_74(versionArray: *mut u8, versionString: *mut ::std::os::raw::c_char); +unsafe extern "C" { + pub fn u_versionToString_74( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); } -extern "C" { +unsafe extern "C" { pub fn u_getVersion_74(versionArray: *mut u8); } pub type UDate = f64; @@ -212,7 +215,7 @@ pub enum UErrorCode { U_PLUGIN_DIDNT_SET_LEVEL = 66817, U_PLUGIN_ERROR_LIMIT = 66818, } -extern "C" { +unsafe extern "C" { pub fn u_errorName_74(code: UErrorCode) -> *const ::std::os::raw::c_char; } #[repr(C)] @@ -220,37 +223,37 @@ extern "C" { pub struct UEnumeration { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uenum_close_74(en: *mut UEnumeration); } -extern "C" { +unsafe extern "C" { pub fn uenum_count_74(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uenum_unext_74( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn uenum_next_74( en: *mut UEnumeration, resultLength: *mut i32, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uenum_reset_74(en: *mut UEnumeration, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uenum_openUCharStringsEnumeration_74( strings: *const *const UChar, count: i32, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uenum_openCharStringsEnumeration_74( strings: *const *const ::std::os::raw::c_char, count: i32, @@ -265,13 +268,13 @@ pub enum ULocDataLocaleType { ULOC_REQUESTED_LOCALE = 2, ULOC_DATA_LOCALE_TYPE_LIMIT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_getDefault_74() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_setDefault_74(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn uloc_getLanguage_74( localeID: *const ::std::os::raw::c_char, language: *mut ::std::os::raw::c_char, @@ -279,7 +282,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getScript_74( localeID: *const ::std::os::raw::c_char, script: *mut ::std::os::raw::c_char, @@ -287,7 +290,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getCountry_74( localeID: *const ::std::os::raw::c_char, country: *mut ::std::os::raw::c_char, @@ -295,7 +298,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getVariant_74( localeID: *const ::std::os::raw::c_char, variant: *mut ::std::os::raw::c_char, @@ -303,7 +306,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getName_74( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -311,7 +314,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_canonicalize_74( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -319,20 +322,20 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Language_74( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISO3Country_74( localeID: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLCID_74(localeID: *const ::std::os::raw::c_char) -> u32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayLanguage_74( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -341,7 +344,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayScript_74( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -350,7 +353,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayCountry_74( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -359,7 +362,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayVariant_74( locale: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -368,7 +371,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeyword_74( keyword: *const ::std::os::raw::c_char, displayLocale: *const ::std::os::raw::c_char, @@ -377,7 +380,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayKeywordValue_74( locale: *const ::std::os::raw::c_char, keyword: *const ::std::os::raw::c_char, @@ -387,7 +390,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getDisplayName_74( localeID: *const ::std::os::raw::c_char, inLocaleID: *const ::std::os::raw::c_char, @@ -396,10 +399,10 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getAvailable_74(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_countAvailable_74() -> i32; } #[repr(u32)] @@ -410,19 +413,19 @@ pub enum ULocAvailableType { ULOC_AVAILABLE_WITH_LEGACY_ALIASES = 2, ULOC_AVAILABLE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn uloc_openAvailableByType_74( type_: ULocAvailableType, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOLanguages_74() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getISOCountries_74() -> *const *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_getParent_74( localeID: *const ::std::os::raw::c_char, parent: *mut ::std::os::raw::c_char, @@ -430,7 +433,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getBaseName_74( localeID: *const ::std::os::raw::c_char, name: *mut ::std::os::raw::c_char, @@ -438,13 +441,13 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_openKeywords_74( localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn uloc_getKeywordValue_74( localeID: *const ::std::os::raw::c_char, keywordName: *const ::std::os::raw::c_char, @@ -453,7 +456,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_setKeywordValue_74( keywordName: *const ::std::os::raw::c_char, keywordValue: *const ::std::os::raw::c_char, @@ -462,7 +465,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_isRightToLeft_74(locale: *const ::std::os::raw::c_char) -> UBool; } #[repr(u32)] @@ -474,13 +477,13 @@ pub enum ULayoutType { ULOC_LAYOUT_BTT = 3, ULOC_LAYOUT_UNKNOWN = 4, } -extern "C" { +unsafe extern "C" { pub fn uloc_getCharacterOrientation_74( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> ULayoutType; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLineOrientation_74( localeId: *const ::std::os::raw::c_char, status: *mut UErrorCode, @@ -493,7 +496,7 @@ pub enum UAcceptResult { ULOC_ACCEPT_VALID = 1, ULOC_ACCEPT_FALLBACK = 2, } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguageFromHTTP_74( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -503,7 +506,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_acceptLanguage_74( result: *mut ::std::os::raw::c_char, resultAvailable: i32, @@ -514,7 +517,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_getLocaleForLCID_74( hostID: u32, locale: *mut ::std::os::raw::c_char, @@ -522,7 +525,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_addLikelySubtags_74( localeID: *const ::std::os::raw::c_char, maximizedLocaleID: *mut ::std::os::raw::c_char, @@ -530,7 +533,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_minimizeSubtags_74( localeID: *const ::std::os::raw::c_char, minimizedLocaleID: *mut ::std::os::raw::c_char, @@ -538,7 +541,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_forLanguageTag_74( langtag: *const ::std::os::raw::c_char, localeID: *mut ::std::os::raw::c_char, @@ -547,7 +550,7 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLanguageTag_74( localeID: *const ::std::os::raw::c_char, langtag: *mut ::std::os::raw::c_char, @@ -556,23 +559,23 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleKey_74( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toUnicodeLocaleType_74( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyKey_74( keyword: *const ::std::os::raw::c_char, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn uloc_toLegacyType_74( keyword: *const ::std::os::raw::c_char, value: *const ::std::os::raw::c_char, @@ -590,13 +593,13 @@ pub enum UCPMapRangeOption { UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, } -extern "C" { +unsafe extern "C" { pub fn ucpmap_get_74(map: *const UCPMap, c: UChar32) -> u32; } pub type UCPMapValueFilter = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, >; -extern "C" { +unsafe extern "C" { pub fn ucpmap_getRange_74( map: *const UCPMap, start: UChar32, @@ -840,115 +843,115 @@ pub enum UPropertyNameChoice { U_LONG_PROPERTY_NAME = 1, U_PROPERTY_NAME_CHOICE_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn u_hasBinaryProperty_74(c: UChar32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_stringHasBinaryProperty_74(s: *const UChar, length: i32, which: UProperty) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getBinaryPropertySet_74( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const USet; } -extern "C" { +unsafe extern "C" { pub fn u_isUAlphabetic_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isULowercase_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUUppercase_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isUWhiteSpace_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyValue_74(c: UChar32, which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMinValue_74(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMaxValue_74(which: UProperty) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getIntPropertyMap_74( property: UProperty, pErrorCode: *mut UErrorCode, ) -> *const UCPMap; } -extern "C" { +unsafe extern "C" { pub fn u_getNumericValue_74(c: UChar32) -> f64; } -extern "C" { +unsafe extern "C" { pub fn u_islower_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isupper_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_istitle_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdigit_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalpha_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isalnum_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isxdigit_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_ispunct_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isgraph_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isblank_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isdefined_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isspace_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaSpaceChar_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isWhitespace_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_iscntrl_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isISOControl_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isprint_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isbase_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charDirection_74(c: UChar32) -> UCharDirection; } -extern "C" { +unsafe extern "C" { pub fn u_isMirrored_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_charMirror_74(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_getBidiPairedBracket_74(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charType_74(c: UChar32) -> i8; } pub type UCharEnumTypeRange = ::std::option::Option< @@ -959,19 +962,19 @@ pub type UCharEnumTypeRange = ::std::option::Option< type_: UCharCategory, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharTypes_74( enumRange: UCharEnumTypeRange, context: *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn u_getCombiningClass_74(c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn u_charDigitValue_74(c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charName_74( code: UChar32, nameChoice: UCharNameChoice, @@ -980,7 +983,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_getISOComment_74( c: UChar32, dest: *mut ::std::os::raw::c_char, @@ -988,7 +991,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_charFromName_74( nameChoice: UCharNameChoice, name: *const ::std::os::raw::c_char, @@ -1004,7 +1007,7 @@ pub type UEnumCharNamesFn = ::std::option::Option< length: i32, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn u_enumCharNames_74( start: UChar32, limit: UChar32, @@ -1014,68 +1017,68 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyName_74( property: UProperty, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyEnum_74(alias: *const ::std::os::raw::c_char) -> UProperty; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueName_74( property: UProperty, value: i32, nameChoice: UPropertyNameChoice, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_getPropertyValueEnum_74( property: UProperty, alias: *const ::std::os::raw::c_char, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_isIDStart_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDPart_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isIDIgnorable_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDStart_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_isJavaIDPart_74(c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_tolower_74(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_toupper_74(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_totitle_74(c: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_foldCase_74(c: UChar32, options: u32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_digit_74(ch: UChar32, radix: i8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_forDigit_74(digit: i32, radix: i8) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_charAge_74(c: UChar32, versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getUnicodeVersion_74(versionArray: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn u_getFC_NFKC_Closure_74( c: UChar32, dest: *mut UChar, @@ -1083,10 +1086,10 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_close_74(ut: *mut UText) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUTF8_74( ut: *mut UText, s: *const ::std::os::raw::c_char, @@ -1094,7 +1097,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_openUChars_74( ut: *mut UText, s: *const UChar, @@ -1102,7 +1105,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_clone_74( dest: *mut UText, src: *const UText, @@ -1111,46 +1114,46 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UText; } -extern "C" { +unsafe extern "C" { pub fn utext_equals_74(a: *const UText, b: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_nativeLength_74(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_isLengthExpensive_74(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_char32At_74(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_current32_74(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32_74(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32_74(ut: *mut UText) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_next32From_74(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_previous32From_74(ut: *mut UText, nativeIndex: i64) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn utext_getNativeIndex_74(ut: *const UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_setNativeIndex_74(ut: *mut UText, nativeIndex: i64); } -extern "C" { +unsafe extern "C" { pub fn utext_moveIndex32_74(ut: *mut UText, delta: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_getPreviousNativeIndex_74(ut: *mut UText) -> i64; } -extern "C" { +unsafe extern "C" { pub fn utext_extract_74( ut: *mut UText, nativeStart: i64, @@ -1160,13 +1163,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_isWritable_74(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_hasMetaData_74(ut: *const UText) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn utext_replace_74( ut: *mut UText, nativeStart: i64, @@ -1176,7 +1179,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utext_copy_74( ut: *mut UText, nativeStart: i64, @@ -1186,7 +1189,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utext_freeze_74(ut: *mut UText); } pub type UTextClone = ::std::option::Option< @@ -1256,181 +1259,34 @@ pub struct UTextFuncs { pub spare2: UTextClose, pub spare3: UTextClose, } -#[test] -fn bindgen_test_layout_UTextFuncs() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UTextFuncs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UTextFuncs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).tableSize) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(tableSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved1) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved2) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved3) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(reserved3) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).clone) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(clone) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeLength) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(nativeLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).access) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(access) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(copy) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapOffsetToNative) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapOffsetToNative) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).mapNativeIndexToUTF16) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(mapNativeIndexToUTF16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).close) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(close) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare1) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare1) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare2) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare2) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).spare3) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UTextFuncs), - "::", - stringify!(spare3) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] pub struct UText { @@ -1459,231 +1315,40 @@ pub struct UText { pub privB: i32, pub privC: i32, } -#[test] -fn bindgen_test_layout_UText() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 144usize, - concat!("Size of: ", stringify!(UText)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UText)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).magic) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(magic) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flags) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(flags) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).providerProperties) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(providerProperties) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeOfStruct) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(sizeOfStruct) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeLimit) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extraSize) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(extraSize) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nativeIndexingLimit) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(nativeIndexingLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkNativeStart) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkNativeStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkLength) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).chunkContents) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(chunkContents) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pFuncs) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pFuncs) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).pExtra) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(pExtra) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).p) as usize - ptr as usize }, - 80usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(p)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).q) as usize - ptr as usize }, - 88usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(q)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).r) as usize - ptr as usize }, - 96usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(r)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privP) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privP) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).a) as usize - ptr as usize }, - 112usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(a)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).b) as usize - ptr as usize }, - 120usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(b)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).c) as usize - ptr as usize }, - 124usize, - concat!("Offset of field: ", stringify!(UText), "::", stringify!(c)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privA) as usize - ptr as usize }, - 128usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privA) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privB) as usize - ptr as usize }, - 136usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privB) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).privC) as usize - ptr as usize }, - 140usize, - concat!( - "Offset of field: ", - stringify!(UText), - "::", - stringify!(privC) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; impl Default for UText { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -1693,7 +1358,7 @@ impl Default for UText { } } } -extern "C" { +unsafe extern "C" { pub fn utext_setup_74(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; } #[repr(C)] @@ -1709,61 +1374,17 @@ pub struct UParseError { pub preContext: [UChar; 16usize], pub postContext: [UChar; 16usize], } -#[test] -fn bindgen_test_layout_UParseError() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 72usize, - concat!("Size of: ", stringify!(UParseError)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UParseError)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).line) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(line) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).preContext) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(preContext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).postContext) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UParseError), - "::", - stringify!(postContext) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UBreakIteratorType { @@ -1816,7 +1437,7 @@ pub enum USentenceBreakTag { UBRK_SENTENCE_TERM_LIMIT = 100, UBRK_SENTENCE_SEP_LIMIT = 200, } -extern "C" { +unsafe extern "C" { pub fn ubrk_open_74( type_: UBreakIteratorType, locale: *const ::std::os::raw::c_char, @@ -1825,7 +1446,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openRules_74( rules: *const UChar, rulesLength: i32, @@ -1835,7 +1456,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_openBinaryRules_74( binaryRules: *const u8, rulesLength: i32, @@ -1844,7 +1465,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_safeClone_74( bi: *const UBreakIterator, stackBuffer: *mut ::std::os::raw::c_void, @@ -1852,14 +1473,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_clone_74(bi: *const UBreakIterator, status: *mut UErrorCode) -> *mut UBreakIterator; } -extern "C" { +unsafe extern "C" { pub fn ubrk_close_74(bi: *mut UBreakIterator); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setText_74( bi: *mut UBreakIterator, text: *const UChar, @@ -1867,43 +1488,43 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ubrk_setUText_74(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_current_74(bi: *const UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_next_74(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_previous_74(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_first_74(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_last_74(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_preceding_74(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_following_74(bi: *mut UBreakIterator, offset: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getAvailable_74(index: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_countAvailable_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_isBoundary_74(bi: *mut UBreakIterator, offset: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatus_74(bi: *mut UBreakIterator) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getRuleStatusVec_74( bi: *mut UBreakIterator, fillInVec: *mut i32, @@ -1911,17 +1532,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ubrk_getLocaleByType_74( bi: *const UBreakIterator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ubrk_refreshUText_74(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ubrk_getBinaryRules_74( bi: *mut UBreakIterator, binaryRules: *mut u8, @@ -2012,7 +1633,7 @@ pub enum USystemTimeZoneType { UCAL_ZONE_TYPE_CANONICAL = 1, UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZoneIDEnumeration_74( zoneType: USystemTimeZoneType, region: *const ::std::os::raw::c_char, @@ -2020,39 +1641,39 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openTimeZones_74(ec: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_openCountryTimeZones_74( country: *const ::std::os::raw::c_char, ec: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDefaultTimeZone_74( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setDefaultTimeZone_74(zoneID: *const UChar, ec: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_getHostTimeZone_74( result: *mut UChar, resultCapacity: i32, ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getDSTSavings_74(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getNow_74() -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_open_74( zoneID: *const UChar, len: i32, @@ -2061,13 +1682,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_close_74(cal: *mut UCalendar); } -extern "C" { +unsafe extern "C" { pub fn ucal_clone_74(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; } -extern "C" { +unsafe extern "C" { pub fn ucal_setTimeZone_74( cal: *mut UCalendar, zoneID: *const UChar, @@ -2075,7 +1696,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneID_74( cal: *const UCalendar, result: *mut UChar, @@ -2091,7 +1712,7 @@ pub enum UCalendarDisplayNameType { UCAL_DST = 2, UCAL_SHORT_DST = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneDisplayName_74( cal: *const UCalendar, type_: UCalendarDisplayNameType, @@ -2101,17 +1722,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_inDaylightTime_74(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_setGregorianChange_74( cal: *mut UCalendar, date: UDate, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_getGregorianChange_74(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; } #[repr(u32)] @@ -2130,25 +1751,25 @@ pub enum UCalendarWallTimeOption { UCAL_WALLTIME_FIRST = 1, UCAL_WALLTIME_NEXT_VALID = 2, } -extern "C" { +unsafe extern "C" { pub fn ucal_getAttribute_74(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_setAttribute_74(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_getAvailable_74(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_countAvailable_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getMillis_74(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ucal_setMillis_74(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDate_74( cal: *mut UCalendar, year: i32, @@ -2157,7 +1778,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_setDateTime_74( cal: *mut UCalendar, year: i32, @@ -2169,10 +1790,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_equivalentTo_74(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_add_74( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2180,7 +1801,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_roll_74( cal: *mut UCalendar, field: UCalendarDateFields, @@ -2188,23 +1809,23 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucal_get_74( cal: *const UCalendar, field: UCalendarDateFields, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_set_74(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); } -extern "C" { +unsafe extern "C" { pub fn ucal_isSet_74(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_clearField_74(cal: *mut UCalendar, field: UCalendarDateFields); } -extern "C" { +unsafe extern "C" { pub fn ucal_clear_74(calendar: *mut UCalendar); } #[repr(u32)] @@ -2217,7 +1838,7 @@ pub enum UCalendarLimitType { UCAL_ACTUAL_MINIMUM = 4, UCAL_ACTUAL_MAXIMUM = 5, } -extern "C" { +unsafe extern "C" { pub fn ucal_getLimit_74( cal: *const UCalendar, field: UCalendarDateFields, @@ -2225,17 +1846,17 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getLocaleByType_74( cal: *const UCalendar, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTZDataVersion_74(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getCanonicalTimeZoneID_74( id: *const UChar, len: i32, @@ -2245,7 +1866,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getIanaTimeZoneID_74( id: *const UChar, len: i32, @@ -2254,13 +1875,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getType_74( cal: *const UCalendar, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucal_getKeywordValuesForLocale_74( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -2276,24 +1897,24 @@ pub enum UCalendarWeekdayType { UCAL_WEEKEND_ONSET = 2, UCAL_WEEKEND_CEASE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getDayOfWeekType_74( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> UCalendarWeekdayType; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWeekendTransition_74( cal: *const UCalendar, dayOfWeek: UCalendarDaysOfWeek, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_isWeekend_74(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getFieldDifference_74( cal: *mut UCalendar, target: UDate, @@ -2309,7 +1930,7 @@ pub enum UTimeZoneTransitionType { UCAL_TZ_TRANSITION_PREVIOUS = 2, UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneTransitionDate_74( cal: *const UCalendar, type_: UTimeZoneTransitionType, @@ -2317,7 +1938,7 @@ extern "C" { status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucal_getWindowsTimeZoneID_74( id: *const UChar, len: i32, @@ -2326,7 +1947,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneIDForWindowsID_74( winid: *const UChar, len: i32, @@ -2346,7 +1967,7 @@ pub enum UTimeZoneLocalOption { UCAL_TZ_LOCAL_DAYLIGHT_FORMER = 7, UCAL_TZ_LOCAL_DAYLIGHT_LATTER = 15, } -extern "C" { +unsafe extern "C" { pub fn ucal_getTimeZoneOffsetFromLocal_74( cal: *const UCalendar, nonExistingTimeOpt: UTimeZoneLocalOption, @@ -2356,10 +1977,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_init_74(status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn u_cleanup_74(); } pub type UMemAllocFn = ::std::option::Option< @@ -2378,7 +1999,7 @@ pub type UMemReallocFn = ::std::option::Option< pub type UMemFreeFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), >; -extern "C" { +unsafe extern "C" { pub fn u_setMemoryFunctions_74( context: *const ::std::os::raw::c_void, a: UMemAllocFn, @@ -2398,7 +2019,7 @@ pub type UMtxInitFn = ::std::option::Option< pub type UMtxFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), >; -extern "C" { +unsafe extern "C" { pub fn u_setMutexFunctions_74( context: *const ::std::os::raw::c_void, init: UMtxInitFn, @@ -2411,7 +2032,7 @@ extern "C" { pub type UMtxAtomicFn = ::std::option::Option< unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, >; -extern "C" { +unsafe extern "C" { pub fn u_setAtomicIncDecFunctions_74( context: *const ::std::os::raw::c_void, inc: UMtxAtomicFn, @@ -2446,102 +2067,29 @@ pub struct UConverterFromUnicodeArgs { pub targetLimit: *const ::std::os::raw::c_char, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterFromUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterFromUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterFromUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterFromUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2563,102 +2111,28 @@ pub struct UConverterToUnicodeArgs { pub targetLimit: *const UChar, pub offsets: *mut i32, } -#[test] -fn bindgen_test_layout_UConverterToUnicodeArgs() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 56usize, - concat!("Size of: ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UConverterToUnicodeArgs)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).flush) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(flush) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).converter) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(converter) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).source) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(source) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sourceLimit) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(sourceLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).target) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(target) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).targetLimit) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(targetLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).offsets) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UConverterToUnicodeArgs), - "::", - stringify!(offsets) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; impl Default for UConverterToUnicodeArgs { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -2738,39 +2212,39 @@ pub type UConverterFromUCallback = ::std::option::Option< pErrorCode: *mut UErrorCode, ), >; -extern "C" { +unsafe extern "C" { pub fn ucnv_compareNames_74( name1: *const ::std::os::raw::c_char, name2: *const ::std::os::raw::c_char, ) -> ::std::os::raw::c_int; } -extern "C" { +unsafe extern "C" { pub fn ucnv_open_74( converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openU_74(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openCCSID_74( codepage: i32, platform: UConverterPlatform, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openPackage_74( packageName: *const ::std::os::raw::c_char, converterName: *const ::std::os::raw::c_char, err: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_clone_74(cnv: *const UConverter, status: *mut UErrorCode) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_safeClone_74( cnv: *const UConverter, stackBuffer: *mut ::std::os::raw::c_void, @@ -2778,10 +2252,10 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UConverter; } -extern "C" { +unsafe extern "C" { pub fn ucnv_close_74(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getSubstChars_74( converter: *const UConverter, subChars: *mut ::std::os::raw::c_char, @@ -2789,7 +2263,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstChars_74( converter: *mut UConverter, subChars: *const ::std::os::raw::c_char, @@ -2797,7 +2271,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setSubstString_74( cnv: *mut UConverter, s: *const UChar, @@ -2805,7 +2279,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidChars_74( converter: *const UConverter, errBytes: *mut ::std::os::raw::c_char, @@ -2813,7 +2287,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getInvalidUChars_74( converter: *const UConverter, errUChars: *mut UChar, @@ -2821,22 +2295,22 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_reset_74(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetToUnicode_74(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_resetFromUnicode_74(converter: *mut UConverter); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMaxCharSize_74(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getMinCharSize_74(converter: *const UConverter) -> i8; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDisplayName_74( converter: *const UConverter, displayLocale: *const ::std::os::raw::c_char, @@ -2845,25 +2319,25 @@ extern "C" { err: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getName_74( converter: *const UConverter, err: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCCSID_74(converter: *const UConverter, err: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getPlatform_74( converter: *const UConverter, err: *mut UErrorCode, ) -> UConverterPlatform; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getType_74(converter: *const UConverter) -> UConverterType; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStarters_74( converter: *const UConverter, starters: *mut UBool, @@ -2877,7 +2351,7 @@ pub enum UConverterUnicodeSet { UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, UCNV_SET_COUNT = 2, } -extern "C" { +unsafe extern "C" { pub fn ucnv_getUnicodeSet_74( cnv: *const UConverter, setFillIn: *mut USet, @@ -2885,21 +2359,21 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getToUCallBack_74( converter: *const UConverter, action: *mut UConverterToUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_getFromUCallBack_74( converter: *const UConverter, action: *mut UConverterFromUCallback, context: *mut *const ::std::os::raw::c_void, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setToUCallBack_74( converter: *mut UConverter, newAction: UConverterToUCallback, @@ -2909,7 +2383,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFromUCallBack_74( converter: *mut UConverter, newAction: UConverterFromUCallback, @@ -2919,7 +2393,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUnicode_74( converter: *mut UConverter, target: *mut *mut ::std::os::raw::c_char, @@ -2931,7 +2405,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUnicode_74( converter: *mut UConverter, target: *mut *mut UChar, @@ -2943,7 +2417,7 @@ extern "C" { err: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUChars_74( cnv: *mut UConverter, dest: *mut ::std::os::raw::c_char, @@ -2953,7 +2427,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUChars_74( cnv: *mut UConverter, dest: *mut UChar, @@ -2963,7 +2437,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getNextUChar_74( converter: *mut UConverter, source: *mut *const ::std::os::raw::c_char, @@ -2971,7 +2445,7 @@ extern "C" { err: *mut UErrorCode, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_convertEx_74( targetCnv: *mut UConverter, sourceCnv: *mut UConverter, @@ -2988,7 +2462,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_convert_74( toConverterName: *const ::std::os::raw::c_char, fromConverterName: *const ::std::os::raw::c_char, @@ -2999,7 +2473,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toAlgorithmic_74( algorithmicType: UConverterType, cnv: *mut UConverter, @@ -3010,7 +2484,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromAlgorithmic_74( cnv: *mut UConverter, algorithmicType: UConverterType, @@ -3021,87 +2495,87 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_flushCache_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAvailable_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAvailableName_74(n: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_openAllNames_74(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countAliases_74( alias: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAlias_74( alias: *const ::std::os::raw::c_char, n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getAliases_74( alias: *const ::std::os::raw::c_char, aliases: *mut *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucnv_openStandardNames_74( convName: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucnv_countStandards_74() -> u16; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandard_74( n: u16, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getStandardName_74( name: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getCanonicalName_74( alias: *const ::std::os::raw::c_char, standard: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_getDefaultName_74() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setDefaultName_74(name: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn ucnv_fixFileSeparator_74(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); } -extern "C" { +unsafe extern "C" { pub fn ucnv_isAmbiguous_74(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_setFallback_74(cnv: *mut UConverter, usesFallback: UBool); } -extern "C" { +unsafe extern "C" { pub fn ucnv_usesFallback_74(cnv: *const UConverter) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucnv_detectUnicodeSignature_74( source: *const ::std::os::raw::c_char, sourceLength: i32, @@ -3109,13 +2583,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucnv_fromUCountPending_74(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_toUCountPending_74(cnv: *const UConverter, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucnv_isFixedWidth_74(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; } #[repr(u32)] @@ -3170,181 +2644,42 @@ pub struct UCharIterator { pub getState: UCharIteratorGetState, pub setState: UCharIteratorSetState, } -#[test] -fn bindgen_test_layout_UCharIterator() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 112usize, - concat!("Size of: ", stringify!(UCharIterator)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCharIterator)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).context) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(context) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(limit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedField) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedField) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getIndex) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).move_) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(move_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasNext) as usize - ptr as usize }, - 48usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasNext) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).hasPrevious) as usize - ptr as usize }, - 56usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(hasPrevious) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).current) as usize - ptr as usize }, - 64usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(current) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).next) as usize - ptr as usize }, - 72usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(next) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).previous) as usize - ptr as usize }, - 80usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(previous) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedFn) as usize - ptr as usize }, - 88usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(reservedFn) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).getState) as usize - ptr as usize }, - 96usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(getState) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).setState) as usize - ptr as usize }, - 104usize, - concat!( - "Offset of field: ", - stringify!(UCharIterator), - "::", - stringify!(setState) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; impl Default for UCharIterator { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -3374,27 +2709,27 @@ pub enum UNormalizationCheckResult { pub struct UNormalizer2 { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFCInstance_74(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFDInstance_74(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCInstance_74(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKDInstance_74(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCCasefoldInstance_74(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getNFKCSimpleCasefoldInstance_74( pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getInstance_74( packageName: *const ::std::os::raw::c_char, name: *const ::std::os::raw::c_char, @@ -3402,17 +2737,17 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_openFiltered_74( norm2: *const UNormalizer2, filterSet: *const USet, pErrorCode: *mut UErrorCode, ) -> *mut UNormalizer2; } -extern "C" { +unsafe extern "C" { pub fn unorm2_close_74(norm2: *mut UNormalizer2); } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalize_74( norm2: *const UNormalizer2, src: *const UChar, @@ -3422,7 +2757,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_normalizeSecondAndAppend_74( norm2: *const UNormalizer2, first: *mut UChar, @@ -3433,7 +2768,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_append_74( norm2: *const UNormalizer2, first: *mut UChar, @@ -3444,7 +2779,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getDecomposition_74( norm2: *const UNormalizer2, c: UChar32, @@ -3453,7 +2788,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getRawDecomposition_74( norm2: *const UNormalizer2, c: UChar32, @@ -3462,13 +2797,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_composePair_74(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_getCombiningClass_74(norm2: *const UNormalizer2, c: UChar32) -> u8; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isNormalized_74( norm2: *const UNormalizer2, s: *const UChar, @@ -3476,7 +2811,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_quickCheck_74( norm2: *const UNormalizer2, s: *const UChar, @@ -3484,7 +2819,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UNormalizationCheckResult; } -extern "C" { +unsafe extern "C" { pub fn unorm2_spanQuickCheckYes_74( norm2: *const UNormalizer2, s: *const UChar, @@ -3492,13 +2827,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryBefore_74(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_hasBoundaryAfter_74(norm2: *const UNormalizer2, c: UChar32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unorm2_isInert_74(norm2: *const UNormalizer2, c: UChar32) -> UBool; } impl UNormalizationMode { @@ -3594,13 +2929,13 @@ pub enum UColRuleOption { UCOL_TAILORING_ONLY = 0, UCOL_FULL_RULES = 1, } -extern "C" { +unsafe extern "C" { pub fn ucol_open_74( loc: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openRules_74( rules: *const UChar, rulesLength: i32, @@ -3610,7 +2945,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_openFromShortString_74( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3618,14 +2953,14 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractions_74( coll: *const UCollator, conts: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getContractionsAndExpansions_74( coll: *const UCollator, contractions: *mut USet, @@ -3634,10 +2969,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_close_74(coll: *mut UCollator); } -extern "C" { +unsafe extern "C" { pub fn ucol_strcoll_74( coll: *const UCollator, source: *const UChar, @@ -3646,7 +2981,7 @@ extern "C" { targetLength: i32, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollUTF8_74( coll: *const UCollator, source: *const ::std::os::raw::c_char, @@ -3656,7 +2991,7 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_greater_74( coll: *const UCollator, source: *const UChar, @@ -3665,7 +3000,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_greaterOrEqual_74( coll: *const UCollator, source: *const UChar, @@ -3674,7 +3009,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_equal_74( coll: *const UCollator, source: *const UChar, @@ -3683,7 +3018,7 @@ extern "C" { targetLength: i32, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucol_strcollIter_74( coll: *const UCollator, sIter: *mut UCharIterator, @@ -3691,13 +3026,13 @@ extern "C" { status: *mut UErrorCode, ) -> UCollationResult; } -extern "C" { +unsafe extern "C" { pub fn ucol_getStrength_74(coll: *const UCollator) -> UCollationStrength; } -extern "C" { +unsafe extern "C" { pub fn ucol_setStrength_74(coll: *mut UCollator, strength: UCollationStrength); } -extern "C" { +unsafe extern "C" { pub fn ucol_getReorderCodes_74( coll: *const UCollator, dest: *mut i32, @@ -3705,7 +3040,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setReorderCodes_74( coll: *mut UCollator, reorderCodes: *const i32, @@ -3713,7 +3048,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getEquivalentReorderCodes_74( reorderCode: i32, dest: *mut i32, @@ -3721,7 +3056,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getDisplayName_74( objLoc: *const ::std::os::raw::c_char, dispLoc: *const ::std::os::raw::c_char, @@ -3730,25 +3065,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getAvailable_74(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_countAvailable_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openAvailableLocales_74(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywords_74(status: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValues_74( keyword: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getKeywordValuesForLocale_74( key: *const ::std::os::raw::c_char, locale: *const ::std::os::raw::c_char, @@ -3756,7 +3091,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucol_getFunctionalEquivalent_74( result: *mut ::std::os::raw::c_char, resultCapacity: i32, @@ -3766,10 +3101,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRules_74(coll: *const UCollator, length: *mut i32) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ucol_getShortDefinitionString_74( coll: *const UCollator, locale: *const ::std::os::raw::c_char, @@ -3778,7 +3113,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_normalizeShortDefinitionString_74( source: *const ::std::os::raw::c_char, destination: *mut ::std::os::raw::c_char, @@ -3787,7 +3122,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getSortKey_74( coll: *const UCollator, source: *const UChar, @@ -3796,7 +3131,7 @@ extern "C" { resultLength: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_nextSortKeyPart_74( coll: *const UCollator, iter: *mut UCharIterator, @@ -3814,7 +3149,7 @@ pub enum UColBoundMode { UCOL_BOUND_UPPER_LONG = 2, UCOL_BOUND_VALUE_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn ucol_getBound_74( source: *const u8, sourceLength: i32, @@ -3825,13 +3160,13 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVersion_74(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_getUCAVersion_74(coll: *const UCollator, info: *mut u8); } -extern "C" { +unsafe extern "C" { pub fn ucol_mergeSortkeys_74( src1: *const u8, src1Length: i32, @@ -3841,7 +3176,7 @@ extern "C" { destCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_setAttribute_74( coll: *mut UCollator, attr: UColAttribute, @@ -3849,24 +3184,24 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getAttribute_74( coll: *const UCollator, attr: UColAttribute, status: *mut UErrorCode, ) -> UColAttributeValue; } -extern "C" { +unsafe extern "C" { pub fn ucol_setMaxVariable_74( coll: *mut UCollator, group: UColReorderCode, pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_getMaxVariable_74(coll: *const UCollator) -> UColReorderCode; } -extern "C" { +unsafe extern "C" { pub fn ucol_setVariableTop_74( coll: *mut UCollator, varTop: *const UChar, @@ -3874,16 +3209,16 @@ extern "C" { status: *mut UErrorCode, ) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getVariableTop_74(coll: *const UCollator, status: *mut UErrorCode) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucol_restoreVariableTop_74(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn ucol_clone_74(coll: *const UCollator, status: *mut UErrorCode) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_safeClone_74( coll: *const UCollator, stackBuffer: *mut ::std::os::raw::c_void, @@ -3891,7 +3226,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UCollator; } -extern "C" { +unsafe extern "C" { pub fn ucol_getRulesEx_74( coll: *const UCollator, delta: UColRuleOption, @@ -3899,31 +3234,31 @@ extern "C" { bufferLen: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocale_74( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getLocaleByType_74( coll: *const UCollator, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucol_getTailoredSet_74(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn ucol_getUnsafeSet_74( coll: *const UCollator, unsafe_: *mut USet, status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_prepareShortStringOpen_74( definition: *const ::std::os::raw::c_char, forceDefaults: UBool, @@ -3931,7 +3266,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucol_cloneBinary_74( coll: *const UCollator, buffer: *mut u8, @@ -3939,7 +3274,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucol_openBinary_74( bin: *const u8, length: i32, @@ -3957,13 +3292,13 @@ pub struct UCharsetDetector { pub struct UCharsetMatch { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ucsdet_open_74(status: *mut UErrorCode) -> *mut UCharsetDetector; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_close_74(ucsd: *mut UCharsetDetector); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setText_74( ucsd: *mut UCharsetDetector, textIn: *const ::std::os::raw::c_char, @@ -3971,7 +3306,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDeclaredEncoding_74( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -3979,35 +3314,35 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detect_74( ucsd: *mut UCharsetDetector, status: *mut UErrorCode, ) -> *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_detectAll_74( ucsd: *mut UCharsetDetector, matchesFound: *mut i32, status: *mut UErrorCode, ) -> *mut *const UCharsetMatch; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getName_74( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getConfidence_74(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getLanguage_74( ucsm: *const UCharsetMatch, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getUChars_74( ucsm: *const UCharsetMatch, buf: *mut UChar, @@ -4015,25 +3350,25 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getAllDetectableCharsets_74( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_isInputFilterEnabled_74(ucsd: *const UCharsetDetector) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_enableInputFilter_74(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_getDetectableCharsets_74( ucsd: *const UCharsetDetector, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn ucsdet_setDetectableCharset_74( ucsd: *mut UCharsetDetector, encoding: *const ::std::os::raw::c_char, @@ -4048,51 +3383,17 @@ pub struct UFieldPosition { pub beginIndex: i32, pub endIndex: i32, } -#[test] -fn bindgen_test_layout_UFieldPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 12usize, - concat!("Size of: ", stringify!(UFieldPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UFieldPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).field) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(field) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).beginIndex) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(beginIndex) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).endIndex) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UFieldPosition), - "::", - stringify!(endIndex) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] pub enum UFormattableType { @@ -4106,54 +3407,54 @@ pub enum UFormattableType { UFMT_COUNT = 7, } pub type UFormattable = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn ufmt_open_74(status: *mut UErrorCode) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_close_74(fmt: *mut UFormattable); } -extern "C" { +unsafe extern "C" { pub fn ufmt_getType_74(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; } -extern "C" { +unsafe extern "C" { pub fn ufmt_isNumeric_74(fmt: *const UFormattable) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDate_74(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDouble_74(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getLong_74(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getInt64_74(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getObject_74( fmt: *const UFormattable, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getUChars_74( fmt: *mut UFormattable, len: *mut i32, status: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayLength_74(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getArrayItemByIndex_74( fmt: *mut UFormattable, n: i32, status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn ufmt_getDecNumChars_74( fmt: *mut UFormattable, len: *mut i32, @@ -4188,13 +3489,13 @@ pub enum UDisplayContext { pub struct UFieldPositionIterator { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_open_74(status: *mut UErrorCode) -> *mut UFieldPositionIterator; } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_close_74(fpositer: *mut UFieldPositionIterator); } -extern "C" { +unsafe extern "C" { pub fn ufieldpositer_next_74( fpositer: *mut UFieldPositionIterator, beginIndex: *mut i32, @@ -4230,7 +3531,7 @@ pub enum UNumberFormatStyle { UNUM_CURRENCY_STANDARD = 16, UNUM_FORMAT_STYLE_COUNT = 17, } -extern "C" { +unsafe extern "C" { pub fn unum_open_74( style: UNumberFormatStyle, pattern: *const UChar, @@ -4240,13 +3541,13 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_close_74(fmt: *mut UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn unum_clone_74(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn unum_format_74( fmt: *const UNumberFormat, number: i32, @@ -4256,7 +3557,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatInt64_74( fmt: *const UNumberFormat, number: i64, @@ -4266,7 +3567,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDouble_74( fmt: *const UNumberFormat, number: f64, @@ -4276,7 +3577,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleForFields_74( format: *const UNumberFormat, number: f64, @@ -4286,7 +3587,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDecimal_74( fmt: *const UNumberFormat, number: *const ::std::os::raw::c_char, @@ -4297,7 +3598,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatDoubleCurrency_74( fmt: *const UNumberFormat, number: f64, @@ -4308,7 +3609,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_formatUFormattable_74( fmt: *const UNumberFormat, number: *const UFormattable, @@ -4318,7 +3619,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parse_74( fmt: *const UNumberFormat, text: *const UChar, @@ -4327,7 +3628,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseInt64_74( fmt: *const UNumberFormat, text: *const UChar, @@ -4336,7 +3637,7 @@ extern "C" { status: *mut UErrorCode, ) -> i64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDouble_74( fmt: *const UNumberFormat, text: *const UChar, @@ -4345,7 +3646,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDecimal_74( fmt: *const UNumberFormat, text: *const UChar, @@ -4356,7 +3657,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_parseDoubleCurrency_74( fmt: *const UNumberFormat, text: *const UChar, @@ -4366,7 +3667,7 @@ extern "C" { status: *mut UErrorCode, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_parseToUFormattable_74( fmt: *const UNumberFormat, result: *mut UFormattable, @@ -4376,7 +3677,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UFormattable; } -extern "C" { +unsafe extern "C" { pub fn unum_applyPattern_74( format: *mut UNumberFormat, localized: UBool, @@ -4386,10 +3687,10 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getAvailable_74(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_countAvailable_74() -> i32; } #[repr(u32)] @@ -4427,26 +3728,26 @@ pub enum UNumberFormatAttribute { UNUM_SIGN_ALWAYS_SHOWN = 4100, UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 4101, } -extern "C" { +unsafe extern "C" { pub fn unum_hasAttribute_74(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> bool; } -extern "C" { +unsafe extern "C" { pub fn unum_getAttribute_74(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setAttribute_74( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, newValue: i32, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getDoubleAttribute_74( fmt: *const UNumberFormat, attr: UNumberFormatAttribute, ) -> f64; } -extern "C" { +unsafe extern "C" { pub fn unum_setDoubleAttribute_74( fmt: *mut UNumberFormat, attr: UNumberFormatAttribute, @@ -4465,7 +3766,7 @@ pub enum UNumberFormatTextAttribute { UNUM_DEFAULT_RULESET = 6, UNUM_PUBLIC_RULESETS = 7, } -extern "C" { +unsafe extern "C" { pub fn unum_getTextAttribute_74( fmt: *const UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4474,7 +3775,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setTextAttribute_74( fmt: *mut UNumberFormat, tag: UNumberFormatTextAttribute, @@ -4483,7 +3784,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_toPattern_74( fmt: *const UNumberFormat, isPatternLocalized: UBool, @@ -4526,7 +3827,7 @@ pub enum UNumberFormatSymbol { UNUM_APPROXIMATELY_SIGN_SYMBOL = 28, UNUM_FORMAT_SYMBOL_COUNT = 29, } -extern "C" { +unsafe extern "C" { pub fn unum_getSymbol_74( fmt: *const UNumberFormat, symbol: UNumberFormatSymbol, @@ -4535,7 +3836,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unum_setSymbol_74( fmt: *mut UNumberFormat, symbol: UNumberFormatSymbol, @@ -4544,21 +3845,21 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getLocaleByType_74( fmt: *const UNumberFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn unum_setContext_74( fmt: *mut UNumberFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unum_getContext_74( fmt: *const UNumberFormat, type_: UDisplayContextType, @@ -4632,10 +3933,10 @@ pub enum UDateFormatField { UDAT_TIME_SEPARATOR_FIELD = 37, UDAT_FIELD_COUNT = 38, } -extern "C" { +unsafe extern "C" { pub fn udat_toCalendarDateField_74(field: UDateFormatField) -> UCalendarDateFields; } -extern "C" { +unsafe extern "C" { pub fn udat_open_74( timeStyle: UDateFormatStyle, dateStyle: UDateFormatStyle, @@ -4647,7 +3948,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_close_74(format: *mut UDateFormat); } #[repr(u32)] @@ -4659,14 +3960,14 @@ pub enum UDateFormatBooleanAttribute { UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udat_getBooleanAttribute_74( fmt: *const UDateFormat, attr: UDateFormatBooleanAttribute, status: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setBooleanAttribute_74( fmt: *mut UDateFormat, attr: UDateFormatBooleanAttribute, @@ -4682,10 +3983,10 @@ pub enum UDateFormatHourCycle { UDAT_HOUR_CYCLE_23 = 2, UDAT_HOUR_CYCLE_24 = 3, } -extern "C" { +unsafe extern "C" { pub fn udat_clone_74(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_format_74( format: *const UDateFormat, dateToFormat: UDate, @@ -4695,7 +3996,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendar_74( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4705,7 +4006,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatForFields_74( format: *const UDateFormat, dateToFormat: UDate, @@ -4715,7 +4016,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_formatCalendarForFields_74( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4725,7 +4026,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_parse_74( format: *const UDateFormat, text: *const UChar, @@ -4734,7 +4035,7 @@ extern "C" { status: *mut UErrorCode, ) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_parseCalendar_74( format: *const UDateFormat, calendar: *mut UCalendar, @@ -4744,28 +4045,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_isLenient_74(fmt: *const UDateFormat) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn udat_setLenient_74(fmt: *mut UDateFormat, isLenient: UBool); } -extern "C" { +unsafe extern "C" { pub fn udat_getCalendar_74(fmt: *const UDateFormat) -> *const UCalendar; } -extern "C" { +unsafe extern "C" { pub fn udat_setCalendar_74(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormat_74(fmt: *const UDateFormat) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_getNumberFormatForField_74( fmt: *const UDateFormat, field: UChar, ) -> *const UNumberFormat; } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormatForFields_74( fmt: *mut UDateFormat, fields: *const UChar, @@ -4773,28 +4074,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_setNumberFormat_74(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); } -extern "C" { +unsafe extern "C" { pub fn udat_adoptNumberFormat_74( fmt: *mut UDateFormat, numberFormatToAdopt: *mut UNumberFormat, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getAvailable_74(localeIndex: i32) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_countAvailable_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_get2DigitYearStart_74(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; } -extern "C" { +unsafe extern "C" { pub fn udat_set2DigitYearStart_74(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_toPattern_74( fmt: *const UDateFormat, localized: UBool, @@ -4803,7 +4104,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPattern_74( format: *mut UDateFormat, localized: UBool, @@ -4850,7 +4151,7 @@ pub enum UDateFormatSymbolType { pub struct UDateFormatSymbols { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn udat_getSymbols_74( fmt: *const UDateFormat, type_: UDateFormatSymbolType, @@ -4860,10 +4161,10 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_countSymbols_74(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_setSymbols_74( format: *mut UDateFormat, type_: UDateFormatSymbolType, @@ -4873,28 +4174,28 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getLocaleByType_74( fmt: *const UDateFormat, type_: ULocDataLocaleType, status: *mut UErrorCode, ) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn udat_setContext_74( fmt: *mut UDateFormat, value: UDisplayContext, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udat_getContext_74( fmt: *const UDateFormat, type_: UDisplayContextType, status: *mut UErrorCode, ) -> UDisplayContext; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeDate_74( fmt: *const UDateFormat, result: *mut UChar, @@ -4902,7 +4203,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_toPatternRelativeTime_74( fmt: *const UDateFormat, result: *mut UChar, @@ -4910,7 +4211,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udat_applyPatternRelative_74( format: *mut UDateFormat, datePattern: *const UChar, @@ -4932,10 +4233,10 @@ pub type UDateFormatOpener = ::std::option::Option< status: *mut UErrorCode, ) -> *mut UDateFormat, >; -extern "C" { +unsafe extern "C" { pub fn udat_registerOpener_74(opener: UDateFormatOpener, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udat_unregisterOpener_74( opener: UDateFormatOpener, status: *mut UErrorCode, @@ -4987,25 +4288,25 @@ pub enum UDateTimePatternConflict { UDATPG_CONFLICT = 2, UDATPG_CONFLICT_COUNT = 3, } -extern "C" { +unsafe extern "C" { pub fn udatpg_open_74( locale: *const ::std::os::raw::c_char, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openEmpty_74(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_close_74(dtpg: *mut UDateTimePatternGenerator); } -extern "C" { +unsafe extern "C" { pub fn udatpg_clone_74( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UDateTimePatternGenerator; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPattern_74( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -5015,7 +4316,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBestPatternWithOptions_74( dtpg: *mut UDateTimePatternGenerator, skeleton: *const UChar, @@ -5026,7 +4327,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getSkeleton_74( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5036,7 +4337,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getBaseSkeleton_74( unusedDtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5046,7 +4347,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_addPattern_74( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5058,7 +4359,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> UDateTimePatternConflict; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemFormat_74( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5066,14 +4367,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemFormat_74( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setAppendItemName_74( dtpg: *mut UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5081,14 +4382,14 @@ extern "C" { length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getAppendItemName_74( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getFieldDisplayName_74( dtpg: *const UDateTimePatternGenerator, field: UDateTimePatternField, @@ -5098,20 +4399,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormat_74( dtpg: *const UDateTimePatternGenerator, dtFormat: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormat_74( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDateTimeFormatForStyle_74( udtpg: *mut UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5120,7 +4421,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDateTimeFormatForStyle_74( udtpg: *const UDateTimePatternGenerator, style: UDateFormatStyle, @@ -5128,20 +4429,20 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_setDecimal_74( dtpg: *mut UDateTimePatternGenerator, decimal: *const UChar, length: i32, ); } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDecimal_74( dtpg: *const UDateTimePatternGenerator, pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypes_74( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5153,7 +4454,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_replaceFieldTypesWithOptions_74( dtpg: *mut UDateTimePatternGenerator, pattern: *const UChar, @@ -5166,19 +4467,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openSkeletons_74( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_openBaseSkeletons_74( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getPatternForSkeleton_74( dtpg: *const UDateTimePatternGenerator, skeleton: *const UChar, @@ -5186,7 +4487,7 @@ extern "C" { pLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn udatpg_getDefaultHourCycle_74( dtpg: *const UDateTimePatternGenerator, pErrorCode: *mut UErrorCode, @@ -5205,111 +4506,28 @@ pub struct UDataInfo { pub formatVersion: [u8; 4usize], pub dataVersion: [u8; 4usize], } -#[test] -fn bindgen_test_layout_UDataInfo() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 20usize, - concat!("Size of: ", stringify!(UDataInfo)) - ); - assert_eq!( - ::std::mem::align_of::(), - 2usize, - concat!("Alignment of ", stringify!(UDataInfo)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).size) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(size) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedWord) as usize - ptr as usize }, - 2usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedWord) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).isBigEndian) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(isBigEndian) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charsetFamily) as usize - ptr as usize }, - 5usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(charsetFamily) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).sizeofUChar) as usize - ptr as usize }, - 6usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(sizeofUChar) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reservedByte) as usize - ptr as usize }, - 7usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(reservedByte) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataFormat) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataFormat) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).formatVersion) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(formatVersion) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataVersion) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UDataInfo), - "::", - stringify!(dataVersion) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct UDataMemory { @@ -5323,7 +4541,7 @@ pub type UDataMemoryIsAcceptable = ::std::option::Option< pInfo: *const UDataInfo, ) -> UBool, >; -extern "C" { +unsafe extern "C" { pub fn udata_open_74( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5331,7 +4549,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_openChoice_74( path: *const ::std::os::raw::c_char, type_: *const ::std::os::raw::c_char, @@ -5341,19 +4559,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UDataMemory; } -extern "C" { +unsafe extern "C" { pub fn udata_close_74(pData: *mut UDataMemory); } -extern "C" { +unsafe extern "C" { pub fn udata_getMemory_74(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; } -extern "C" { +unsafe extern "C" { pub fn udata_getInfo_74(pData: *mut UDataMemory, pInfo: *mut UDataInfo); } -extern "C" { +unsafe extern "C" { pub fn udata_setCommonData_74(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn udata_setAppData_74( packageName: *const ::std::os::raw::c_char, data: *const ::std::os::raw::c_void, @@ -5372,7 +4590,7 @@ pub enum UDataFileAccess { UDATA_NO_FILES = 3, UDATA_FILE_ACCESS_COUNT = 4, } -extern "C" { +unsafe extern "C" { pub fn udata_setFileAccess_74(access: UDataFileAccess, status: *mut UErrorCode); } #[repr(u32)] @@ -5424,13 +4642,13 @@ pub enum UListFormatterWidth { ULISTFMT_WIDTH_SHORT = 1, ULISTFMT_WIDTH_NARROW = 2, } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_open_74( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openForType_74( locale: *const ::std::os::raw::c_char, type_: UListFormatterType, @@ -5438,22 +4656,22 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UListFormatter; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_close_74(listfmt: *mut UListFormatter); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_openResult_74(ec: *mut UErrorCode) -> *mut UFormattedList; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_resultAsValue_74( uresult: *const UFormattedList, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_closeResult_74(uresult: *mut UFormattedList); } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_format_74( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5464,7 +4682,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ulistfmt_formatStringsToResult_74( listfmt: *const UListFormatter, strings: *const *const UChar, @@ -5475,7 +4693,7 @@ extern "C" { ); } pub type va_list = __builtin_va_list; -extern "C" { +unsafe extern "C" { pub fn u_formatMessage_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5486,7 +4704,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessage_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5497,7 +4715,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessage_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5508,7 +4726,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessage_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5519,7 +4737,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_formatMessageWithError_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5531,7 +4749,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_vformatMessageWithError_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5543,7 +4761,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_parseMessageWithError_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5555,7 +4773,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn u_vparseMessageWithError_74( locale: *const ::std::os::raw::c_char, pattern: *const UChar, @@ -5568,7 +4786,7 @@ extern "C" { ); } pub type UMessageFormat = *mut ::std::os::raw::c_void; -extern "C" { +unsafe extern "C" { pub fn umsg_open_74( pattern: *const UChar, patternLength: i32, @@ -5577,19 +4795,19 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_close_74(format: *mut UMessageFormat); } -extern "C" { +unsafe extern "C" { pub fn umsg_clone_74(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; } -extern "C" { +unsafe extern "C" { pub fn umsg_setLocale_74(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn umsg_getLocale_74(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn umsg_applyPattern_74( fmt: *mut UMessageFormat, pattern: *const UChar, @@ -5598,7 +4816,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_toPattern_74( fmt: *const UMessageFormat, result: *mut UChar, @@ -5606,7 +4824,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_format_74( fmt: *const UMessageFormat, result: *mut UChar, @@ -5615,7 +4833,7 @@ extern "C" { ... ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_vformat_74( fmt: *const UMessageFormat, result: *mut UChar, @@ -5624,7 +4842,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn umsg_parse_74( fmt: *const UMessageFormat, source: *const UChar, @@ -5634,7 +4852,7 @@ extern "C" { ... ); } -extern "C" { +unsafe extern "C" { pub fn umsg_vparse_74( fmt: *const UMessageFormat, source: *const UChar, @@ -5644,7 +4862,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umsg_autoQuoteApostrophe_74( pattern: *const UChar, patternLength: i32, @@ -5658,16 +4876,16 @@ extern "C" { pub struct UFormattedNumber { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openResult_74(ec: *mut UErrorCode) -> *mut UFormattedNumber; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultAsValue_74( uresult: *const UFormattedNumber, ec: *mut UErrorCode, ) -> *const UFormattedValue; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToString_74( uresult: *const UFormattedNumber, buffer: *mut UChar, @@ -5675,21 +4893,21 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultNextFieldPosition_74( uresult: *const UFormattedNumber, ufpos: *mut UFieldPosition, ec: *mut UErrorCode, ) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn unumf_resultGetAllFieldPositions_74( uresult: *const UFormattedNumber, ufpositer: *mut UFieldPositionIterator, ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_resultToDecimalNumber_74( uresult: *const UFormattedNumber, dest: *mut ::std::os::raw::c_char, @@ -5697,7 +4915,7 @@ extern "C" { ec: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn unumf_closeResult_74(uresult: *mut UFormattedNumber); } #[repr(C)] @@ -5705,7 +4923,7 @@ extern "C" { pub struct UNumberFormatter { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocale_74( skeleton: *const UChar, skeletonLen: i32, @@ -5713,7 +4931,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_openForSkeletonAndLocaleWithError_74( skeleton: *const UChar, skeletonLen: i32, @@ -5722,7 +4940,7 @@ extern "C" { ec: *mut UErrorCode, ) -> *mut UNumberFormatter; } -extern "C" { +unsafe extern "C" { pub fn unumf_formatInt_74( uformatter: *const UNumberFormatter, value: i64, @@ -5730,7 +4948,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDouble_74( uformatter: *const UNumberFormatter, value: f64, @@ -5738,7 +4956,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_formatDecimal_74( uformatter: *const UNumberFormatter, value: *const ::std::os::raw::c_char, @@ -5747,7 +4965,7 @@ extern "C" { ec: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn unumf_close_74(uformatter: *mut UNumberFormatter); } #[repr(C)] @@ -5767,23 +4985,23 @@ pub enum UPluralType { pub struct UPluralRules { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn uplrules_open_74( locale: *const ::std::os::raw::c_char, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_openForType_74( locale: *const ::std::os::raw::c_char, type_: UPluralType, status: *mut UErrorCode, ) -> *mut UPluralRules; } -extern "C" { +unsafe extern "C" { pub fn uplrules_close_74(uplrules: *mut UPluralRules); } -extern "C" { +unsafe extern "C" { pub fn uplrules_select_74( uplrules: *const UPluralRules, number: f64, @@ -5792,7 +5010,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectFormatted_74( uplrules: *const UPluralRules, number: *const UFormattedNumber, @@ -5801,7 +5019,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectForRange_74( uplrules: *const UPluralRules, urange: *const UFormattedNumberRange, @@ -5810,7 +5028,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_selectWithFormat_74( uplrules: *const UPluralRules, number: f64, @@ -5820,53 +5038,53 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn uplrules_getKeywords_74( uplrules: *const UPluralRules, status: *mut UErrorCode, ) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn u_getDataDirectory_74() -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setDataDirectory_74(directory: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_74(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_74( path: *const ::std::os::raw::c_char, status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn u_charsToUChars_74(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_UCharsToChars_74(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); } -extern "C" { +unsafe extern "C" { pub fn u_strlen_74(s: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_countChar32_74(s: *const UChar, length: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strHasMoreChar32Than_74(s: *const UChar, length: i32, number: i32) -> UBool; } -extern "C" { +unsafe extern "C" { pub fn u_strcat_74(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncat_74(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strstr_74(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindFirst_74( s: *const UChar, length: i32, @@ -5874,16 +5092,16 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr_74(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strchr32_74(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrstr_74(s: *const UChar, substring: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFindLast_74( s: *const UChar, length: i32, @@ -5891,35 +5109,35 @@ extern "C" { subLength: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr_74(s: *const UChar, c: UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strrchr32_74(s: *const UChar, c: UChar32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strpbrk_74(string: *const UChar, matchSet: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcspn_74(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strspn_74(string: *const UChar, matchSet: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strtok_r_74( src: *mut UChar, delim: *const UChar, saveState: *mut *mut UChar, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strcmp_74(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcmpCodePointOrder_74(s1: *const UChar, s2: *const UChar) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompare_74( s1: *const UChar, length1: i32, @@ -5928,14 +5146,14 @@ extern "C" { codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCompareIter_74( iter1: *mut UCharIterator, iter2: *mut UCharIterator, codePointOrder: UBool, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strCaseCompare_74( s1: *const UChar, length1: i32, @@ -5945,78 +5163,78 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmp_74(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncmpCodePointOrder_74(s1: *const UChar, s2: *const UChar, n: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcasecmp_74(s1: *const UChar, s2: *const UChar, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strncasecmp_74(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcasecmp_74(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strcpy_74(dst: *mut UChar, src: *const UChar) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strncpy_74(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrcpy_74(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_uastrncpy_74( dst: *mut UChar, src: *const ::std::os::raw::c_char, n: i32, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_austrcpy_74( dst: *mut ::std::os::raw::c_char, src: *const UChar, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_austrncpy_74( dst: *mut ::std::os::raw::c_char, src: *const UChar, n: i32, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_memcpy_74(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memmove_74(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memset_74(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memcmp_74(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memcmpCodePointOrder_74(s1: *const UChar, s2: *const UChar, count: i32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_memchr_74(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memchr32_74(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr_74(s: *const UChar, c: UChar, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_memrchr32_74(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_unescape_74( src: *const ::std::os::raw::c_char, dest: *mut UChar, @@ -6026,7 +5244,7 @@ extern "C" { pub type UNESCAPE_CHAR_AT = ::std::option::Option< unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, >; -extern "C" { +unsafe extern "C" { pub fn u_unescapeAt_74( charAt: UNESCAPE_CHAR_AT, offset: *mut i32, @@ -6034,7 +5252,7 @@ extern "C" { context: *mut ::std::os::raw::c_void, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strToUpper_74( dest: *mut UChar, destCapacity: i32, @@ -6044,7 +5262,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToLower_74( dest: *mut UChar, destCapacity: i32, @@ -6054,7 +5272,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToTitle_74( dest: *mut UChar, destCapacity: i32, @@ -6065,7 +5283,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strFoldCase_74( dest: *mut UChar, destCapacity: i32, @@ -6075,7 +5293,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn u_strToWCS_74( dest: *mut wchar_t, destCapacity: i32, @@ -6085,7 +5303,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut wchar_t; } -extern "C" { +unsafe extern "C" { pub fn u_strFromWCS_74( dest: *mut UChar, destCapacity: i32, @@ -6095,7 +5313,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8_74( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6105,7 +5323,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8_74( dest: *mut UChar, destCapacity: i32, @@ -6115,7 +5333,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF8WithSub_74( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6127,7 +5345,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8WithSub_74( dest: *mut UChar, destCapacity: i32, @@ -6139,7 +5357,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF8Lenient_74( dest: *mut UChar, destCapacity: i32, @@ -6149,7 +5367,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32_74( dest: *mut UChar32, destCapacity: i32, @@ -6159,7 +5377,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32_74( dest: *mut UChar, destCapacity: i32, @@ -6169,7 +5387,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToUTF32WithSub_74( dest: *mut UChar32, destCapacity: i32, @@ -6181,7 +5399,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar32; } -extern "C" { +unsafe extern "C" { pub fn u_strFromUTF32WithSub_74( dest: *mut UChar, destCapacity: i32, @@ -6193,7 +5411,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UChar; } -extern "C" { +unsafe extern "C" { pub fn u_strToJavaModifiedUTF8_74( dest: *mut ::std::os::raw::c_char, destCapacity: i32, @@ -6203,7 +5421,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut ::std::os::raw::c_char; } -extern "C" { +unsafe extern "C" { pub fn u_strFromJavaModifiedUTF8WithSub_74( dest: *mut UChar, destCapacity: i32, @@ -6241,82 +5459,24 @@ pub struct UReplaceableCallbacks { unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), >, } -#[test] -fn bindgen_test_layout_UReplaceableCallbacks() { - const UNINIT: ::std::mem::MaybeUninit = - ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UReplaceableCallbacks)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).length) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(length) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).charAt) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(charAt) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).char32At) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(char32At) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).replace) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(replace) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).extract) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(extract) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).copy) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UReplaceableCallbacks), - "::", - stringify!(copy) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; pub type UTransliterator = *mut ::std::os::raw::c_void; #[repr(u32)] #[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] @@ -6332,62 +5492,20 @@ pub struct UTransPosition { pub start: i32, pub limit: i32, } -#[test] -fn bindgen_test_layout_UTransPosition() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 16usize, - concat!("Size of: ", stringify!(UTransPosition)) - ); - assert_eq!( - ::std::mem::align_of::(), - 4usize, - concat!("Alignment of ", stringify!(UTransPosition)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextStart) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).contextLimit) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(contextLimit) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).start) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(start) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).limit) as usize - ptr as usize }, - 12usize, - concat!( - "Offset of field: ", - stringify!(UTransPosition), - "::", - stringify!(limit) - ) - ); -} -extern "C" { +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { pub fn utrans_openU_74( id: *const UChar, idLength: i32, @@ -6398,34 +5516,34 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_openInverse_74( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_clone_74( trans: *const UTransliterator, status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_close_74(trans: *mut UTransliterator); } -extern "C" { +unsafe extern "C" { pub fn utrans_getUnicodeID_74( trans: *const UTransliterator, resultLength: *mut i32, ) -> *const UChar; } -extern "C" { +unsafe extern "C" { pub fn utrans_register_74(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); } -extern "C" { +unsafe extern "C" { pub fn utrans_unregisterID_74(id: *const UChar, idLength: i32); } -extern "C" { +unsafe extern "C" { pub fn utrans_setFilter_74( trans: *mut UTransliterator, filterPattern: *const UChar, @@ -6433,13 +5551,13 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_countAvailableIDs_74() -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_openIDs_74(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; } -extern "C" { +unsafe extern "C" { pub fn utrans_trans_74( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6449,7 +5567,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncremental_74( trans: *const UTransliterator, rep: *mut UReplaceable, @@ -6458,7 +5576,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transUChars_74( trans: *const UTransliterator, text: *mut UChar, @@ -6469,7 +5587,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_transIncrementalUChars_74( trans: *const UTransliterator, text: *mut UChar, @@ -6479,7 +5597,7 @@ extern "C" { status: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn utrans_toRules_74( trans: *const UTransliterator, escapeUnprintable: UBool, @@ -6488,7 +5606,7 @@ extern "C" { status: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_getSourceSet_74( trans: *const UTransliterator, ignoreFilter: UBool, @@ -6496,7 +5614,7 @@ extern "C" { status: *mut UErrorCode, ) -> *mut USet; } -extern "C" { +unsafe extern "C" { pub fn utrans_open_74( id: *const ::std::os::raw::c_char, dir: UTransDirection, @@ -6506,17 +5624,17 @@ extern "C" { status: *mut UErrorCode, ) -> *mut UTransliterator; } -extern "C" { +unsafe extern "C" { pub fn utrans_getID_74( trans: *const UTransliterator, buf: *mut ::std::os::raw::c_char, bufCapacity: i32, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn utrans_unregister_74(id: *const ::std::os::raw::c_char); } -extern "C" { +unsafe extern "C" { pub fn utrans_getAvailableID_74( index: i32, buf: *mut ::std::os::raw::c_char, @@ -6531,61 +5649,15 @@ pub union UCPTrieData { pub ptr32: *const u32, pub ptr8: *const u8, } -#[test] -fn bindgen_test_layout_UCPTrieData() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 8usize, - concat!("Size of: ", stringify!(UCPTrieData)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrieData)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr0) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr0) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr16) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr32) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).ptr8) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrieData), - "::", - stringify!(ptr8) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; impl Default for UCPTrieData { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6612,151 +5684,28 @@ pub struct UCPTrie { pub dataNullOffset: i32, pub nullValue: u32, } -#[test] -fn bindgen_test_layout_UCPTrie() { - const UNINIT: ::std::mem::MaybeUninit = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::(), - 48usize, - concat!("Size of: ", stringify!(UCPTrie)) - ); - assert_eq!( - ::std::mem::align_of::(), - 8usize, - concat!("Alignment of ", stringify!(UCPTrie)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).data) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(data) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).indexLength) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(indexLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataLength) as usize - ptr as usize }, - 20usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataLength) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).highStart) as usize - ptr as usize }, - 24usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(highStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).shifted12HighStart) as usize - ptr as usize }, - 28usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(shifted12HighStart) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).type_) as usize - ptr as usize }, - 30usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(type_) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).valueWidth) as usize - ptr as usize }, - 31usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(valueWidth) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved32) as usize - ptr as usize }, - 32usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved32) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reserved16) as usize - ptr as usize }, - 36usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(reserved16) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).index3NullOffset) as usize - ptr as usize }, - 38usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(index3NullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).dataNullOffset) as usize - ptr as usize }, - 40usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(dataNullOffset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).nullValue) as usize - ptr as usize }, - 44usize, - concat!( - "Offset of field: ", - stringify!(UCPTrie), - "::", - stringify!(nullValue) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; impl Default for UCPTrie { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); @@ -6781,7 +5730,7 @@ pub enum UCPTrieValueWidth { UCPTRIE_VALUE_BITS_32 = 1, UCPTRIE_VALUE_BITS_8 = 2, } -extern "C" { +unsafe extern "C" { pub fn ucptrie_openFromBinary_74( type_: UCPTrieType, valueWidth: UCPTrieValueWidth, @@ -6791,19 +5740,19 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> *mut UCPTrie; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_close_74(trie: *mut UCPTrie); } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getType_74(trie: *const UCPTrie) -> UCPTrieType; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getValueWidth_74(trie: *const UCPTrie) -> UCPTrieValueWidth; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_get_74(trie: *const UCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_getRange_74( trie: *const UCPTrie, start: UChar32, @@ -6814,7 +5763,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_toBinary_74( trie: *const UCPTrie, data: *mut ::std::os::raw::c_void, @@ -6822,13 +5771,13 @@ extern "C" { pErrorCode: *mut UErrorCode, ) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallIndex_74(trie: *const UCPTrie, c: UChar32) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalSmallU8Index_74(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; } -extern "C" { +unsafe extern "C" { pub fn ucptrie_internalU8PrevIndex_74( trie: *const UCPTrie, c: UChar32, @@ -6841,38 +5790,38 @@ extern "C" { pub struct UMutableCPTrie { _unused: [u8; 0], } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_open_74( initialValue: u32, errorValue: u32, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_clone_74( other: *const UMutableCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_close_74(trie: *mut UMutableCPTrie); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPMap_74( map: *const UCPMap, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_fromUCPTrie_74( trie: *const UCPTrie, pErrorCode: *mut UErrorCode, ) -> *mut UMutableCPTrie; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_get_74(trie: *const UMutableCPTrie, c: UChar32) -> u32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_getRange_74( trie: *const UMutableCPTrie, start: UChar32, @@ -6883,7 +5832,7 @@ extern "C" { pValue: *mut u32, ) -> UChar32; } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_set_74( trie: *mut UMutableCPTrie, c: UChar32, @@ -6891,7 +5840,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_setRange_74( trie: *mut UMutableCPTrie, start: UChar32, @@ -6900,7 +5849,7 @@ extern "C" { pErrorCode: *mut UErrorCode, ); } -extern "C" { +unsafe extern "C" { pub fn umutablecptrie_buildImmutable_74( trie: *mut UMutableCPTrie, type_: UCPTrieType, @@ -6917,61 +5866,19 @@ pub struct __va_list_tag { pub overflow_arg_area: *mut ::std::os::raw::c_void, pub reg_save_area: *mut ::std::os::raw::c_void, } -#[test] -fn bindgen_test_layout___va_list_tag() { - const UNINIT: ::std::mem::MaybeUninit<__va_list_tag> = ::std::mem::MaybeUninit::uninit(); - let ptr = UNINIT.as_ptr(); - assert_eq!( - ::std::mem::size_of::<__va_list_tag>(), - 24usize, - concat!("Size of: ", stringify!(__va_list_tag)) - ); - assert_eq!( - ::std::mem::align_of::<__va_list_tag>(), - 8usize, - concat!("Alignment of ", stringify!(__va_list_tag)) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).gp_offset) as usize - ptr as usize }, - 0usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(gp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).fp_offset) as usize - ptr as usize }, - 4usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(fp_offset) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).overflow_arg_area) as usize - ptr as usize }, - 8usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(overflow_arg_area) - ) - ); - assert_eq!( - unsafe { ::std::ptr::addr_of!((*ptr).reg_save_area) as usize - ptr as usize }, - 16usize, - concat!( - "Offset of field: ", - stringify!(__va_list_tag), - "::", - stringify!(reg_save_area) - ) - ); -} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; impl Default for __va_list_tag { fn default() -> Self { let mut s = ::std::mem::MaybeUninit::::uninit(); diff --git a/rust_icu_sys/bindgen/lib_76.rs b/rust_icu_sys/bindgen/lib_76.rs new file mode 100644 index 0000000..1b9678d --- /dev/null +++ b/rust_icu_sys/bindgen/lib_76.rs @@ -0,0 +1,5936 @@ +/* automatically generated by rust-bindgen 0.72.1 */ + +pub type wchar_t = ::std::os::raw::c_int; +pub type __uint16_t = ::std::os::raw::c_ushort; +pub type __uint_least16_t = __uint16_t; +pub type char16_t = __uint_least16_t; +pub type UBool = i8; +pub type UChar = char16_t; +pub type UChar32 = i32; +pub type UVersionInfo = [u8; 4usize]; +unsafe extern "C" { + pub fn u_versionFromString_76( + versionArray: *mut u8, + versionString: *const ::std::os::raw::c_char, + ); +} +unsafe extern "C" { + pub fn u_versionFromUString_76(versionArray: *mut u8, versionString: *const UChar); +} +unsafe extern "C" { + pub fn u_versionToString_76( + versionArray: *const u8, + versionString: *mut ::std::os::raw::c_char, + ); +} +unsafe extern "C" { + pub fn u_getVersion_76(versionArray: *mut u8); +} +pub type UDate = f64; +impl UErrorCode { + pub const U_ERROR_WARNING_START: UErrorCode = UErrorCode::U_USING_FALLBACK_WARNING; +} +impl UErrorCode { + pub const U_PARSE_ERROR_START: UErrorCode = UErrorCode::U_BAD_VARIABLE_DEFINITION; +} +impl UErrorCode { + pub const U_FMT_PARSE_ERROR_START: UErrorCode = UErrorCode::U_UNEXPECTED_TOKEN; +} +impl UErrorCode { + pub const U_MULTIPLE_DECIMAL_SEPERATORS: UErrorCode = UErrorCode::U_MULTIPLE_DECIMAL_SEPARATORS; +} +impl UErrorCode { + pub const U_BRK_ERROR_START: UErrorCode = UErrorCode::U_BRK_INTERNAL_ERROR; +} +impl UErrorCode { + pub const U_REGEX_ERROR_START: UErrorCode = UErrorCode::U_REGEX_INTERNAL_ERROR; +} +impl UErrorCode { + pub const U_IDNA_ERROR_START: UErrorCode = UErrorCode::U_IDNA_PROHIBITED_ERROR; +} +impl UErrorCode { + pub const U_STRINGPREP_PROHIBITED_ERROR: UErrorCode = UErrorCode::U_IDNA_PROHIBITED_ERROR; +} +impl UErrorCode { + pub const U_STRINGPREP_UNASSIGNED_ERROR: UErrorCode = UErrorCode::U_IDNA_UNASSIGNED_ERROR; +} +impl UErrorCode { + pub const U_STRINGPREP_CHECK_BIDI_ERROR: UErrorCode = UErrorCode::U_IDNA_CHECK_BIDI_ERROR; +} +impl UErrorCode { + pub const U_PLUGIN_TOO_HIGH: UErrorCode = UErrorCode::U_PLUGIN_ERROR_START; +} +impl UErrorCode { + pub const U_ERROR_LIMIT: UErrorCode = UErrorCode::U_PLUGIN_ERROR_LIMIT; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UErrorCode { + U_USING_FALLBACK_WARNING = -128, + U_USING_DEFAULT_WARNING = -127, + U_SAFECLONE_ALLOCATED_WARNING = -126, + U_STATE_OLD_WARNING = -125, + U_STRING_NOT_TERMINATED_WARNING = -124, + U_SORT_KEY_TOO_SHORT_WARNING = -123, + U_AMBIGUOUS_ALIAS_WARNING = -122, + U_DIFFERENT_UCA_VERSION = -121, + U_PLUGIN_CHANGED_LEVEL_WARNING = -120, + U_ERROR_WARNING_LIMIT = -119, + U_ZERO_ERROR = 0, + U_ILLEGAL_ARGUMENT_ERROR = 1, + U_MISSING_RESOURCE_ERROR = 2, + U_INVALID_FORMAT_ERROR = 3, + U_FILE_ACCESS_ERROR = 4, + U_INTERNAL_PROGRAM_ERROR = 5, + U_MESSAGE_PARSE_ERROR = 6, + U_MEMORY_ALLOCATION_ERROR = 7, + U_INDEX_OUTOFBOUNDS_ERROR = 8, + U_PARSE_ERROR = 9, + U_INVALID_CHAR_FOUND = 10, + U_TRUNCATED_CHAR_FOUND = 11, + U_ILLEGAL_CHAR_FOUND = 12, + U_INVALID_TABLE_FORMAT = 13, + U_INVALID_TABLE_FILE = 14, + U_BUFFER_OVERFLOW_ERROR = 15, + U_UNSUPPORTED_ERROR = 16, + U_RESOURCE_TYPE_MISMATCH = 17, + U_ILLEGAL_ESCAPE_SEQUENCE = 18, + U_UNSUPPORTED_ESCAPE_SEQUENCE = 19, + U_NO_SPACE_AVAILABLE = 20, + U_CE_NOT_FOUND_ERROR = 21, + U_PRIMARY_TOO_LONG_ERROR = 22, + U_STATE_TOO_OLD_ERROR = 23, + U_TOO_MANY_ALIASES_ERROR = 24, + U_ENUM_OUT_OF_SYNC_ERROR = 25, + U_INVARIANT_CONVERSION_ERROR = 26, + U_INVALID_STATE_ERROR = 27, + U_COLLATOR_VERSION_MISMATCH = 28, + U_USELESS_COLLATOR_ERROR = 29, + U_NO_WRITE_PERMISSION = 30, + U_INPUT_TOO_LONG_ERROR = 31, + U_STANDARD_ERROR_LIMIT = 32, + U_BAD_VARIABLE_DEFINITION = 65536, + U_MALFORMED_RULE = 65537, + U_MALFORMED_SET = 65538, + U_MALFORMED_SYMBOL_REFERENCE = 65539, + U_MALFORMED_UNICODE_ESCAPE = 65540, + U_MALFORMED_VARIABLE_DEFINITION = 65541, + U_MALFORMED_VARIABLE_REFERENCE = 65542, + U_MISMATCHED_SEGMENT_DELIMITERS = 65543, + U_MISPLACED_ANCHOR_START = 65544, + U_MISPLACED_CURSOR_OFFSET = 65545, + U_MISPLACED_QUANTIFIER = 65546, + U_MISSING_OPERATOR = 65547, + U_MISSING_SEGMENT_CLOSE = 65548, + U_MULTIPLE_ANTE_CONTEXTS = 65549, + U_MULTIPLE_CURSORS = 65550, + U_MULTIPLE_POST_CONTEXTS = 65551, + U_TRAILING_BACKSLASH = 65552, + U_UNDEFINED_SEGMENT_REFERENCE = 65553, + U_UNDEFINED_VARIABLE = 65554, + U_UNQUOTED_SPECIAL = 65555, + U_UNTERMINATED_QUOTE = 65556, + U_RULE_MASK_ERROR = 65557, + U_MISPLACED_COMPOUND_FILTER = 65558, + U_MULTIPLE_COMPOUND_FILTERS = 65559, + U_INVALID_RBT_SYNTAX = 65560, + U_INVALID_PROPERTY_PATTERN = 65561, + U_MALFORMED_PRAGMA = 65562, + U_UNCLOSED_SEGMENT = 65563, + U_ILLEGAL_CHAR_IN_SEGMENT = 65564, + U_VARIABLE_RANGE_EXHAUSTED = 65565, + U_VARIABLE_RANGE_OVERLAP = 65566, + U_ILLEGAL_CHARACTER = 65567, + U_INTERNAL_TRANSLITERATOR_ERROR = 65568, + U_INVALID_ID = 65569, + U_INVALID_FUNCTION = 65570, + U_PARSE_ERROR_LIMIT = 65571, + U_UNEXPECTED_TOKEN = 65792, + U_MULTIPLE_DECIMAL_SEPARATORS = 65793, + U_MULTIPLE_EXPONENTIAL_SYMBOLS = 65794, + U_MALFORMED_EXPONENTIAL_PATTERN = 65795, + U_MULTIPLE_PERCENT_SYMBOLS = 65796, + U_MULTIPLE_PERMILL_SYMBOLS = 65797, + U_MULTIPLE_PAD_SPECIFIERS = 65798, + U_PATTERN_SYNTAX_ERROR = 65799, + U_ILLEGAL_PAD_POSITION = 65800, + U_UNMATCHED_BRACES = 65801, + U_UNSUPPORTED_PROPERTY = 65802, + U_UNSUPPORTED_ATTRIBUTE = 65803, + U_ARGUMENT_TYPE_MISMATCH = 65804, + U_DUPLICATE_KEYWORD = 65805, + U_UNDEFINED_KEYWORD = 65806, + U_DEFAULT_KEYWORD_MISSING = 65807, + U_DECIMAL_NUMBER_SYNTAX_ERROR = 65808, + U_FORMAT_INEXACT_ERROR = 65809, + U_NUMBER_ARG_OUTOFBOUNDS_ERROR = 65810, + U_NUMBER_SKELETON_SYNTAX_ERROR = 65811, + U_MF_UNRESOLVED_VARIABLE_ERROR = 65812, + U_MF_SYNTAX_ERROR = 65813, + U_MF_UNKNOWN_FUNCTION_ERROR = 65814, + U_MF_VARIANT_KEY_MISMATCH_ERROR = 65815, + U_MF_FORMATTING_ERROR = 65816, + U_MF_NONEXHAUSTIVE_PATTERN_ERROR = 65817, + U_MF_DUPLICATE_OPTION_NAME_ERROR = 65818, + U_MF_SELECTOR_ERROR = 65819, + U_MF_MISSING_SELECTOR_ANNOTATION_ERROR = 65820, + U_MF_DUPLICATE_DECLARATION_ERROR = 65821, + U_MF_OPERAND_MISMATCH_ERROR = 65822, + U_MF_DUPLICATE_VARIANT_ERROR = 65823, + U_FMT_PARSE_ERROR_LIMIT = 65824, + U_BRK_INTERNAL_ERROR = 66048, + U_BRK_HEX_DIGITS_EXPECTED = 66049, + U_BRK_SEMICOLON_EXPECTED = 66050, + U_BRK_RULE_SYNTAX = 66051, + U_BRK_UNCLOSED_SET = 66052, + U_BRK_ASSIGN_ERROR = 66053, + U_BRK_VARIABLE_REDFINITION = 66054, + U_BRK_MISMATCHED_PAREN = 66055, + U_BRK_NEW_LINE_IN_QUOTED_STRING = 66056, + U_BRK_UNDEFINED_VARIABLE = 66057, + U_BRK_INIT_ERROR = 66058, + U_BRK_RULE_EMPTY_SET = 66059, + U_BRK_UNRECOGNIZED_OPTION = 66060, + U_BRK_MALFORMED_RULE_TAG = 66061, + U_BRK_ERROR_LIMIT = 66062, + U_REGEX_INTERNAL_ERROR = 66304, + U_REGEX_RULE_SYNTAX = 66305, + U_REGEX_INVALID_STATE = 66306, + U_REGEX_BAD_ESCAPE_SEQUENCE = 66307, + U_REGEX_PROPERTY_SYNTAX = 66308, + U_REGEX_UNIMPLEMENTED = 66309, + U_REGEX_MISMATCHED_PAREN = 66310, + U_REGEX_NUMBER_TOO_BIG = 66311, + U_REGEX_BAD_INTERVAL = 66312, + U_REGEX_MAX_LT_MIN = 66313, + U_REGEX_INVALID_BACK_REF = 66314, + U_REGEX_INVALID_FLAG = 66315, + U_REGEX_LOOK_BEHIND_LIMIT = 66316, + U_REGEX_SET_CONTAINS_STRING = 66317, + U_REGEX_OCTAL_TOO_BIG = 66318, + U_REGEX_MISSING_CLOSE_BRACKET = 66319, + U_REGEX_INVALID_RANGE = 66320, + U_REGEX_STACK_OVERFLOW = 66321, + U_REGEX_TIME_OUT = 66322, + U_REGEX_STOPPED_BY_CALLER = 66323, + U_REGEX_PATTERN_TOO_BIG = 66324, + U_REGEX_INVALID_CAPTURE_GROUP_NAME = 66325, + U_REGEX_ERROR_LIMIT = 66326, + U_IDNA_PROHIBITED_ERROR = 66560, + U_IDNA_UNASSIGNED_ERROR = 66561, + U_IDNA_CHECK_BIDI_ERROR = 66562, + U_IDNA_STD3_ASCII_RULES_ERROR = 66563, + U_IDNA_ACE_PREFIX_ERROR = 66564, + U_IDNA_VERIFICATION_ERROR = 66565, + U_IDNA_LABEL_TOO_LONG_ERROR = 66566, + U_IDNA_ZERO_LENGTH_LABEL_ERROR = 66567, + U_IDNA_DOMAIN_NAME_TOO_LONG_ERROR = 66568, + U_IDNA_ERROR_LIMIT = 66569, + U_PLUGIN_ERROR_START = 66816, + U_PLUGIN_DIDNT_SET_LEVEL = 66817, + U_PLUGIN_ERROR_LIMIT = 66818, +} +unsafe extern "C" { + pub fn u_errorName_76(code: UErrorCode) -> *const ::std::os::raw::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UEnumeration { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn uenum_close_76(en: *mut UEnumeration); +} +unsafe extern "C" { + pub fn uenum_count_76(en: *mut UEnumeration, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn uenum_unext_76( + en: *mut UEnumeration, + resultLength: *mut i32, + status: *mut UErrorCode, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn uenum_next_76( + en: *mut UEnumeration, + resultLength: *mut i32, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uenum_reset_76(en: *mut UEnumeration, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn uenum_openUCharStringsEnumeration_76( + strings: *const *const UChar, + count: i32, + ec: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn uenum_openCharStringsEnumeration_76( + strings: *const *const ::std::os::raw::c_char, + count: i32, + ec: *mut UErrorCode, + ) -> *mut UEnumeration; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum ULocDataLocaleType { + ULOC_ACTUAL_LOCALE = 0, + ULOC_VALID_LOCALE = 1, + ULOC_REQUESTED_LOCALE = 2, + ULOC_DATA_LOCALE_TYPE_LIMIT = 3, +} +unsafe extern "C" { + pub fn uloc_getDefault_76() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_setDefault_76(localeID: *const ::std::os::raw::c_char, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn uloc_getLanguage_76( + localeID: *const ::std::os::raw::c_char, + language: *mut ::std::os::raw::c_char, + languageCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getScript_76( + localeID: *const ::std::os::raw::c_char, + script: *mut ::std::os::raw::c_char, + scriptCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getCountry_76( + localeID: *const ::std::os::raw::c_char, + country: *mut ::std::os::raw::c_char, + countryCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getVariant_76( + localeID: *const ::std::os::raw::c_char, + variant: *mut ::std::os::raw::c_char, + variantCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getName_76( + localeID: *const ::std::os::raw::c_char, + name: *mut ::std::os::raw::c_char, + nameCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_canonicalize_76( + localeID: *const ::std::os::raw::c_char, + name: *mut ::std::os::raw::c_char, + nameCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getISO3Language_76( + localeID: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_getISO3Country_76( + localeID: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_getLCID_76(localeID: *const ::std::os::raw::c_char) -> u32; +} +unsafe extern "C" { + pub fn uloc_getDisplayLanguage_76( + locale: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + language: *mut UChar, + languageCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayScript_76( + locale: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + script: *mut UChar, + scriptCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayCountry_76( + locale: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + country: *mut UChar, + countryCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayVariant_76( + locale: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + variant: *mut UChar, + variantCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayKeyword_76( + keyword: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + dest: *mut UChar, + destCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayKeywordValue_76( + locale: *const ::std::os::raw::c_char, + keyword: *const ::std::os::raw::c_char, + displayLocale: *const ::std::os::raw::c_char, + dest: *mut UChar, + destCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getDisplayName_76( + localeID: *const ::std::os::raw::c_char, + inLocaleID: *const ::std::os::raw::c_char, + result: *mut UChar, + maxResultSize: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getAvailable_76(n: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_countAvailable_76() -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum ULocAvailableType { + ULOC_AVAILABLE_DEFAULT = 0, + ULOC_AVAILABLE_ONLY_LEGACY_ALIASES = 1, + ULOC_AVAILABLE_WITH_LEGACY_ALIASES = 2, + ULOC_AVAILABLE_COUNT = 3, +} +unsafe extern "C" { + pub fn uloc_openAvailableByType_76( + type_: ULocAvailableType, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn uloc_getISOLanguages_76() -> *const *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_getISOCountries_76() -> *const *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_getParent_76( + localeID: *const ::std::os::raw::c_char, + parent: *mut ::std::os::raw::c_char, + parentCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getBaseName_76( + localeID: *const ::std::os::raw::c_char, + name: *mut ::std::os::raw::c_char, + nameCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_openKeywords_76( + localeID: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn uloc_getKeywordValue_76( + localeID: *const ::std::os::raw::c_char, + keywordName: *const ::std::os::raw::c_char, + buffer: *mut ::std::os::raw::c_char, + bufferCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_setKeywordValue_76( + keywordName: *const ::std::os::raw::c_char, + keywordValue: *const ::std::os::raw::c_char, + buffer: *mut ::std::os::raw::c_char, + bufferCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_isRightToLeft_76(locale: *const ::std::os::raw::c_char) -> UBool; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum ULayoutType { + ULOC_LAYOUT_LTR = 0, + ULOC_LAYOUT_RTL = 1, + ULOC_LAYOUT_TTB = 2, + ULOC_LAYOUT_BTT = 3, + ULOC_LAYOUT_UNKNOWN = 4, +} +unsafe extern "C" { + pub fn uloc_getCharacterOrientation_76( + localeId: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> ULayoutType; +} +unsafe extern "C" { + pub fn uloc_getLineOrientation_76( + localeId: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> ULayoutType; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UAcceptResult { + ULOC_ACCEPT_FAILED = 0, + ULOC_ACCEPT_VALID = 1, + ULOC_ACCEPT_FALLBACK = 2, +} +unsafe extern "C" { + pub fn uloc_acceptLanguageFromHTTP_76( + result: *mut ::std::os::raw::c_char, + resultAvailable: i32, + outResult: *mut UAcceptResult, + httpAcceptLanguage: *const ::std::os::raw::c_char, + availableLocales: *mut UEnumeration, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_acceptLanguage_76( + result: *mut ::std::os::raw::c_char, + resultAvailable: i32, + outResult: *mut UAcceptResult, + acceptList: *mut *const ::std::os::raw::c_char, + acceptListCount: i32, + availableLocales: *mut UEnumeration, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_getLocaleForLCID_76( + hostID: u32, + locale: *mut ::std::os::raw::c_char, + localeCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_addLikelySubtags_76( + localeID: *const ::std::os::raw::c_char, + maximizedLocaleID: *mut ::std::os::raw::c_char, + maximizedLocaleIDCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_minimizeSubtags_76( + localeID: *const ::std::os::raw::c_char, + minimizedLocaleID: *mut ::std::os::raw::c_char, + minimizedLocaleIDCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_forLanguageTag_76( + langtag: *const ::std::os::raw::c_char, + localeID: *mut ::std::os::raw::c_char, + localeIDCapacity: i32, + parsedLength: *mut i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_toLanguageTag_76( + localeID: *const ::std::os::raw::c_char, + langtag: *mut ::std::os::raw::c_char, + langtagCapacity: i32, + strict: UBool, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uloc_toUnicodeLocaleKey_76( + keyword: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_toUnicodeLocaleType_76( + keyword: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_toLegacyKey_76( + keyword: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn uloc_toLegacyType_76( + keyword: *const ::std::os::raw::c_char, + value: *const ::std::os::raw::c_char, + ) -> *const ::std::os::raw::c_char; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UCPMap { + _unused: [u8; 0], +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCPMapRangeOption { + UCPMAP_RANGE_NORMAL = 0, + UCPMAP_RANGE_FIXED_LEAD_SURROGATES = 1, + UCPMAP_RANGE_FIXED_ALL_SURROGATES = 2, +} +unsafe extern "C" { + pub fn ucpmap_get_76(map: *const UCPMap, c: UChar32) -> u32; +} +pub type UCPMapValueFilter = ::std::option::Option< + unsafe extern "C" fn(context: *const ::std::os::raw::c_void, value: u32) -> u32, +>; +unsafe extern "C" { + pub fn ucpmap_getRange_76( + map: *const UCPMap, + start: UChar32, + option: UCPMapRangeOption, + surrogateValue: u32, + filter: UCPMapValueFilter, + context: *const ::std::os::raw::c_void, + pValue: *mut u32, + ) -> UChar32; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct USet { + _unused: [u8; 0], +} +impl UProperty { + pub const UCHAR_BINARY_START: UProperty = UProperty::UCHAR_ALPHABETIC; +} +impl UProperty { + pub const UCHAR_INT_START: UProperty = UProperty::UCHAR_BIDI_CLASS; +} +impl UProperty { + pub const UCHAR_MASK_START: UProperty = UProperty::UCHAR_GENERAL_CATEGORY_MASK; +} +impl UProperty { + pub const UCHAR_DOUBLE_START: UProperty = UProperty::UCHAR_NUMERIC_VALUE; +} +impl UProperty { + pub const UCHAR_STRING_START: UProperty = UProperty::UCHAR_AGE; +} +impl UProperty { + pub const UCHAR_OTHER_PROPERTY_START: UProperty = UProperty::UCHAR_SCRIPT_EXTENSIONS; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UProperty { + UCHAR_ALPHABETIC = 0, + UCHAR_ASCII_HEX_DIGIT = 1, + UCHAR_BIDI_CONTROL = 2, + UCHAR_BIDI_MIRRORED = 3, + UCHAR_DASH = 4, + UCHAR_DEFAULT_IGNORABLE_CODE_POINT = 5, + UCHAR_DEPRECATED = 6, + UCHAR_DIACRITIC = 7, + UCHAR_EXTENDER = 8, + UCHAR_FULL_COMPOSITION_EXCLUSION = 9, + UCHAR_GRAPHEME_BASE = 10, + UCHAR_GRAPHEME_EXTEND = 11, + UCHAR_GRAPHEME_LINK = 12, + UCHAR_HEX_DIGIT = 13, + UCHAR_HYPHEN = 14, + UCHAR_ID_CONTINUE = 15, + UCHAR_ID_START = 16, + UCHAR_IDEOGRAPHIC = 17, + UCHAR_IDS_BINARY_OPERATOR = 18, + UCHAR_IDS_TRINARY_OPERATOR = 19, + UCHAR_JOIN_CONTROL = 20, + UCHAR_LOGICAL_ORDER_EXCEPTION = 21, + UCHAR_LOWERCASE = 22, + UCHAR_MATH = 23, + UCHAR_NONCHARACTER_CODE_POINT = 24, + UCHAR_QUOTATION_MARK = 25, + UCHAR_RADICAL = 26, + UCHAR_SOFT_DOTTED = 27, + UCHAR_TERMINAL_PUNCTUATION = 28, + UCHAR_UNIFIED_IDEOGRAPH = 29, + UCHAR_UPPERCASE = 30, + UCHAR_WHITE_SPACE = 31, + UCHAR_XID_CONTINUE = 32, + UCHAR_XID_START = 33, + UCHAR_CASE_SENSITIVE = 34, + UCHAR_S_TERM = 35, + UCHAR_VARIATION_SELECTOR = 36, + UCHAR_NFD_INERT = 37, + UCHAR_NFKD_INERT = 38, + UCHAR_NFC_INERT = 39, + UCHAR_NFKC_INERT = 40, + UCHAR_SEGMENT_STARTER = 41, + UCHAR_PATTERN_SYNTAX = 42, + UCHAR_PATTERN_WHITE_SPACE = 43, + UCHAR_POSIX_ALNUM = 44, + UCHAR_POSIX_BLANK = 45, + UCHAR_POSIX_GRAPH = 46, + UCHAR_POSIX_PRINT = 47, + UCHAR_POSIX_XDIGIT = 48, + UCHAR_CASED = 49, + UCHAR_CASE_IGNORABLE = 50, + UCHAR_CHANGES_WHEN_LOWERCASED = 51, + UCHAR_CHANGES_WHEN_UPPERCASED = 52, + UCHAR_CHANGES_WHEN_TITLECASED = 53, + UCHAR_CHANGES_WHEN_CASEFOLDED = 54, + UCHAR_CHANGES_WHEN_CASEMAPPED = 55, + UCHAR_CHANGES_WHEN_NFKC_CASEFOLDED = 56, + UCHAR_EMOJI = 57, + UCHAR_EMOJI_PRESENTATION = 58, + UCHAR_EMOJI_MODIFIER = 59, + UCHAR_EMOJI_MODIFIER_BASE = 60, + UCHAR_EMOJI_COMPONENT = 61, + UCHAR_REGIONAL_INDICATOR = 62, + UCHAR_PREPENDED_CONCATENATION_MARK = 63, + UCHAR_EXTENDED_PICTOGRAPHIC = 64, + UCHAR_BASIC_EMOJI = 65, + UCHAR_EMOJI_KEYCAP_SEQUENCE = 66, + UCHAR_RGI_EMOJI_MODIFIER_SEQUENCE = 67, + UCHAR_RGI_EMOJI_FLAG_SEQUENCE = 68, + UCHAR_RGI_EMOJI_TAG_SEQUENCE = 69, + UCHAR_RGI_EMOJI_ZWJ_SEQUENCE = 70, + UCHAR_RGI_EMOJI = 71, + UCHAR_IDS_UNARY_OPERATOR = 72, + UCHAR_ID_COMPAT_MATH_START = 73, + UCHAR_ID_COMPAT_MATH_CONTINUE = 74, + UCHAR_MODIFIER_COMBINING_MARK = 75, + UCHAR_BINARY_LIMIT = 76, + UCHAR_BIDI_CLASS = 4096, + UCHAR_BLOCK = 4097, + UCHAR_CANONICAL_COMBINING_CLASS = 4098, + UCHAR_DECOMPOSITION_TYPE = 4099, + UCHAR_EAST_ASIAN_WIDTH = 4100, + UCHAR_GENERAL_CATEGORY = 4101, + UCHAR_JOINING_GROUP = 4102, + UCHAR_JOINING_TYPE = 4103, + UCHAR_LINE_BREAK = 4104, + UCHAR_NUMERIC_TYPE = 4105, + UCHAR_SCRIPT = 4106, + UCHAR_HANGUL_SYLLABLE_TYPE = 4107, + UCHAR_NFD_QUICK_CHECK = 4108, + UCHAR_NFKD_QUICK_CHECK = 4109, + UCHAR_NFC_QUICK_CHECK = 4110, + UCHAR_NFKC_QUICK_CHECK = 4111, + UCHAR_LEAD_CANONICAL_COMBINING_CLASS = 4112, + UCHAR_TRAIL_CANONICAL_COMBINING_CLASS = 4113, + UCHAR_GRAPHEME_CLUSTER_BREAK = 4114, + UCHAR_SENTENCE_BREAK = 4115, + UCHAR_WORD_BREAK = 4116, + UCHAR_BIDI_PAIRED_BRACKET_TYPE = 4117, + UCHAR_INDIC_POSITIONAL_CATEGORY = 4118, + UCHAR_INDIC_SYLLABIC_CATEGORY = 4119, + UCHAR_VERTICAL_ORIENTATION = 4120, + UCHAR_IDENTIFIER_STATUS = 4121, + UCHAR_INDIC_CONJUNCT_BREAK = 4122, + UCHAR_INT_LIMIT = 4123, + UCHAR_GENERAL_CATEGORY_MASK = 8192, + UCHAR_MASK_LIMIT = 8193, + UCHAR_NUMERIC_VALUE = 12288, + UCHAR_DOUBLE_LIMIT = 12289, + UCHAR_AGE = 16384, + UCHAR_BIDI_MIRRORING_GLYPH = 16385, + UCHAR_CASE_FOLDING = 16386, + UCHAR_ISO_COMMENT = 16387, + UCHAR_LOWERCASE_MAPPING = 16388, + UCHAR_NAME = 16389, + UCHAR_SIMPLE_CASE_FOLDING = 16390, + UCHAR_SIMPLE_LOWERCASE_MAPPING = 16391, + UCHAR_SIMPLE_TITLECASE_MAPPING = 16392, + UCHAR_SIMPLE_UPPERCASE_MAPPING = 16393, + UCHAR_TITLECASE_MAPPING = 16394, + UCHAR_UNICODE_1_NAME = 16395, + UCHAR_UPPERCASE_MAPPING = 16396, + UCHAR_BIDI_PAIRED_BRACKET = 16397, + UCHAR_STRING_LIMIT = 16398, + UCHAR_SCRIPT_EXTENSIONS = 28672, + UCHAR_IDENTIFIER_TYPE = 28673, + UCHAR_OTHER_PROPERTY_LIMIT = 28674, + UCHAR_INVALID_CODE = -1, +} +impl UCharCategory { + pub const U_GENERAL_OTHER_TYPES: UCharCategory = UCharCategory::U_UNASSIGNED; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCharCategory { + U_UNASSIGNED = 0, + U_UPPERCASE_LETTER = 1, + U_LOWERCASE_LETTER = 2, + U_TITLECASE_LETTER = 3, + U_MODIFIER_LETTER = 4, + U_OTHER_LETTER = 5, + U_NON_SPACING_MARK = 6, + U_ENCLOSING_MARK = 7, + U_COMBINING_SPACING_MARK = 8, + U_DECIMAL_DIGIT_NUMBER = 9, + U_LETTER_NUMBER = 10, + U_OTHER_NUMBER = 11, + U_SPACE_SEPARATOR = 12, + U_LINE_SEPARATOR = 13, + U_PARAGRAPH_SEPARATOR = 14, + U_CONTROL_CHAR = 15, + U_FORMAT_CHAR = 16, + U_PRIVATE_USE_CHAR = 17, + U_SURROGATE = 18, + U_DASH_PUNCTUATION = 19, + U_START_PUNCTUATION = 20, + U_END_PUNCTUATION = 21, + U_CONNECTOR_PUNCTUATION = 22, + U_OTHER_PUNCTUATION = 23, + U_MATH_SYMBOL = 24, + U_CURRENCY_SYMBOL = 25, + U_MODIFIER_SYMBOL = 26, + U_OTHER_SYMBOL = 27, + U_INITIAL_PUNCTUATION = 28, + U_FINAL_PUNCTUATION = 29, + U_CHAR_CATEGORY_COUNT = 30, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCharDirection { + U_LEFT_TO_RIGHT = 0, + U_RIGHT_TO_LEFT = 1, + U_EUROPEAN_NUMBER = 2, + U_EUROPEAN_NUMBER_SEPARATOR = 3, + U_EUROPEAN_NUMBER_TERMINATOR = 4, + U_ARABIC_NUMBER = 5, + U_COMMON_NUMBER_SEPARATOR = 6, + U_BLOCK_SEPARATOR = 7, + U_SEGMENT_SEPARATOR = 8, + U_WHITE_SPACE_NEUTRAL = 9, + U_OTHER_NEUTRAL = 10, + U_LEFT_TO_RIGHT_EMBEDDING = 11, + U_LEFT_TO_RIGHT_OVERRIDE = 12, + U_RIGHT_TO_LEFT_ARABIC = 13, + U_RIGHT_TO_LEFT_EMBEDDING = 14, + U_RIGHT_TO_LEFT_OVERRIDE = 15, + U_POP_DIRECTIONAL_FORMAT = 16, + U_DIR_NON_SPACING_MARK = 17, + U_BOUNDARY_NEUTRAL = 18, + U_FIRST_STRONG_ISOLATE = 19, + U_LEFT_TO_RIGHT_ISOLATE = 20, + U_RIGHT_TO_LEFT_ISOLATE = 21, + U_POP_DIRECTIONAL_ISOLATE = 22, + U_CHAR_DIRECTION_COUNT = 23, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCharNameChoice { + U_UNICODE_CHAR_NAME = 0, + U_UNICODE_10_CHAR_NAME = 1, + U_EXTENDED_CHAR_NAME = 2, + U_CHAR_NAME_ALIAS = 3, + U_CHAR_NAME_CHOICE_COUNT = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UPropertyNameChoice { + U_SHORT_PROPERTY_NAME = 0, + U_LONG_PROPERTY_NAME = 1, + U_PROPERTY_NAME_CHOICE_COUNT = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UIdentifierType { + U_ID_TYPE_NOT_CHARACTER = 0, + U_ID_TYPE_DEPRECATED = 1, + U_ID_TYPE_DEFAULT_IGNORABLE = 2, + U_ID_TYPE_NOT_NFKC = 3, + U_ID_TYPE_NOT_XID = 4, + U_ID_TYPE_EXCLUSION = 5, + U_ID_TYPE_OBSOLETE = 6, + U_ID_TYPE_TECHNICAL = 7, + U_ID_TYPE_UNCOMMON_USE = 8, + U_ID_TYPE_LIMITED_USE = 9, + U_ID_TYPE_INCLUSION = 10, + U_ID_TYPE_RECOMMENDED = 11, +} +unsafe extern "C" { + pub fn u_hasBinaryProperty_76(c: UChar32, which: UProperty) -> UBool; +} +unsafe extern "C" { + pub fn u_stringHasBinaryProperty_76(s: *const UChar, length: i32, which: UProperty) -> UBool; +} +unsafe extern "C" { + pub fn u_getBinaryPropertySet_76( + property: UProperty, + pErrorCode: *mut UErrorCode, + ) -> *const USet; +} +unsafe extern "C" { + pub fn u_isUAlphabetic_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isULowercase_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isUUppercase_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isUWhiteSpace_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_getIntPropertyValue_76(c: UChar32, which: UProperty) -> i32; +} +unsafe extern "C" { + pub fn u_getIntPropertyMinValue_76(which: UProperty) -> i32; +} +unsafe extern "C" { + pub fn u_getIntPropertyMaxValue_76(which: UProperty) -> i32; +} +unsafe extern "C" { + pub fn u_getIntPropertyMap_76( + property: UProperty, + pErrorCode: *mut UErrorCode, + ) -> *const UCPMap; +} +unsafe extern "C" { + pub fn u_getNumericValue_76(c: UChar32) -> f64; +} +unsafe extern "C" { + pub fn u_islower_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isupper_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_istitle_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isdigit_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isalpha_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isalnum_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isxdigit_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_ispunct_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isgraph_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isblank_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isdefined_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isspace_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isJavaSpaceChar_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isWhitespace_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_iscntrl_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isISOControl_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isprint_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isbase_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_charDirection_76(c: UChar32) -> UCharDirection; +} +unsafe extern "C" { + pub fn u_isMirrored_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_charMirror_76(c: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn u_getBidiPairedBracket_76(c: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn u_charType_76(c: UChar32) -> i8; +} +pub type UCharEnumTypeRange = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + start: UChar32, + limit: UChar32, + type_: UCharCategory, + ) -> UBool, +>; +unsafe extern "C" { + pub fn u_enumCharTypes_76( + enumRange: UCharEnumTypeRange, + context: *const ::std::os::raw::c_void, + ); +} +unsafe extern "C" { + pub fn u_getCombiningClass_76(c: UChar32) -> u8; +} +unsafe extern "C" { + pub fn u_charDigitValue_76(c: UChar32) -> i32; +} +unsafe extern "C" { + pub fn u_charName_76( + code: UChar32, + nameChoice: UCharNameChoice, + buffer: *mut ::std::os::raw::c_char, + bufferLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_getISOComment_76( + c: UChar32, + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_charFromName_76( + nameChoice: UCharNameChoice, + name: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> UChar32; +} +pub type UEnumCharNamesFn = ::std::option::Option< + unsafe extern "C" fn( + context: *mut ::std::os::raw::c_void, + code: UChar32, + nameChoice: UCharNameChoice, + name: *const ::std::os::raw::c_char, + length: i32, + ) -> UBool, +>; +unsafe extern "C" { + pub fn u_enumCharNames_76( + start: UChar32, + limit: UChar32, + fn_: UEnumCharNamesFn, + context: *mut ::std::os::raw::c_void, + nameChoice: UCharNameChoice, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn u_getPropertyName_76( + property: UProperty, + nameChoice: UPropertyNameChoice, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_getPropertyEnum_76(alias: *const ::std::os::raw::c_char) -> UProperty; +} +unsafe extern "C" { + pub fn u_getPropertyValueName_76( + property: UProperty, + value: i32, + nameChoice: UPropertyNameChoice, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_getPropertyValueEnum_76( + property: UProperty, + alias: *const ::std::os::raw::c_char, + ) -> i32; +} +unsafe extern "C" { + pub fn u_isIDStart_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isIDPart_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_hasIDType_76(c: UChar32, type_: UIdentifierType) -> bool; +} +unsafe extern "C" { + pub fn u_getIDTypes_76( + c: UChar32, + types: *mut UIdentifierType, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_isIDIgnorable_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isJavaIDStart_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_isJavaIDPart_76(c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn u_tolower_76(c: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn u_toupper_76(c: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn u_totitle_76(c: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn u_foldCase_76(c: UChar32, options: u32) -> UChar32; +} +unsafe extern "C" { + pub fn u_digit_76(ch: UChar32, radix: i8) -> i32; +} +unsafe extern "C" { + pub fn u_forDigit_76(digit: i32, radix: i8) -> UChar32; +} +unsafe extern "C" { + pub fn u_charAge_76(c: UChar32, versionArray: *mut u8); +} +unsafe extern "C" { + pub fn u_getUnicodeVersion_76(versionArray: *mut u8); +} +unsafe extern "C" { + pub fn u_getFC_NFKC_Closure_76( + c: UChar32, + dest: *mut UChar, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn utext_close_76(ut: *mut UText) -> *mut UText; +} +unsafe extern "C" { + pub fn utext_openUTF8_76( + ut: *mut UText, + s: *const ::std::os::raw::c_char, + length: i64, + status: *mut UErrorCode, + ) -> *mut UText; +} +unsafe extern "C" { + pub fn utext_openUChars_76( + ut: *mut UText, + s: *const UChar, + length: i64, + status: *mut UErrorCode, + ) -> *mut UText; +} +unsafe extern "C" { + pub fn utext_clone_76( + dest: *mut UText, + src: *const UText, + deep: UBool, + readOnly: UBool, + status: *mut UErrorCode, + ) -> *mut UText; +} +unsafe extern "C" { + pub fn utext_equals_76(a: *const UText, b: *const UText) -> UBool; +} +unsafe extern "C" { + pub fn utext_nativeLength_76(ut: *mut UText) -> i64; +} +unsafe extern "C" { + pub fn utext_isLengthExpensive_76(ut: *const UText) -> UBool; +} +unsafe extern "C" { + pub fn utext_char32At_76(ut: *mut UText, nativeIndex: i64) -> UChar32; +} +unsafe extern "C" { + pub fn utext_current32_76(ut: *mut UText) -> UChar32; +} +unsafe extern "C" { + pub fn utext_next32_76(ut: *mut UText) -> UChar32; +} +unsafe extern "C" { + pub fn utext_previous32_76(ut: *mut UText) -> UChar32; +} +unsafe extern "C" { + pub fn utext_next32From_76(ut: *mut UText, nativeIndex: i64) -> UChar32; +} +unsafe extern "C" { + pub fn utext_previous32From_76(ut: *mut UText, nativeIndex: i64) -> UChar32; +} +unsafe extern "C" { + pub fn utext_getNativeIndex_76(ut: *const UText) -> i64; +} +unsafe extern "C" { + pub fn utext_setNativeIndex_76(ut: *mut UText, nativeIndex: i64); +} +unsafe extern "C" { + pub fn utext_moveIndex32_76(ut: *mut UText, delta: i32) -> UBool; +} +unsafe extern "C" { + pub fn utext_getPreviousNativeIndex_76(ut: *mut UText) -> i64; +} +unsafe extern "C" { + pub fn utext_extract_76( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + dest: *mut UChar, + destCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn utext_isWritable_76(ut: *const UText) -> UBool; +} +unsafe extern "C" { + pub fn utext_hasMetaData_76(ut: *const UText) -> UBool; +} +unsafe extern "C" { + pub fn utext_replace_76( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + replacementText: *const UChar, + replacementLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn utext_copy_76( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + destIndex: i64, + move_: UBool, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utext_freeze_76(ut: *mut UText); +} +pub type UTextClone = ::std::option::Option< + unsafe extern "C" fn( + dest: *mut UText, + src: *const UText, + deep: UBool, + status: *mut UErrorCode, + ) -> *mut UText, +>; +pub type UTextNativeLength = ::std::option::Option i64>; +pub type UTextAccess = ::std::option::Option< + unsafe extern "C" fn(ut: *mut UText, nativeIndex: i64, forward: UBool) -> UBool, +>; +pub type UTextExtract = ::std::option::Option< + unsafe extern "C" fn( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + dest: *mut UChar, + destCapacity: i32, + status: *mut UErrorCode, + ) -> i32, +>; +pub type UTextReplace = ::std::option::Option< + unsafe extern "C" fn( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + replacementText: *const UChar, + replacmentLength: i32, + status: *mut UErrorCode, + ) -> i32, +>; +pub type UTextCopy = ::std::option::Option< + unsafe extern "C" fn( + ut: *mut UText, + nativeStart: i64, + nativeLimit: i64, + nativeDest: i64, + move_: UBool, + status: *mut UErrorCode, + ), +>; +pub type UTextMapOffsetToNative = + ::std::option::Option i64>; +pub type UTextMapNativeIndexToUTF16 = + ::std::option::Option i32>; +pub type UTextClose = ::std::option::Option; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UTextFuncs { + pub tableSize: i32, + pub reserved1: i32, + pub reserved2: i32, + pub reserved3: i32, + pub clone: UTextClone, + pub nativeLength: UTextNativeLength, + pub access: UTextAccess, + pub extract: UTextExtract, + pub replace: UTextReplace, + pub copy: UTextCopy, + pub mapOffsetToNative: UTextMapOffsetToNative, + pub mapNativeIndexToUTF16: UTextMapNativeIndexToUTF16, + pub close: UTextClose, + pub spare1: UTextClose, + pub spare2: UTextClose, + pub spare3: UTextClose, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTextFuncs"][::std::mem::size_of::() - 112usize]; + ["Alignment of UTextFuncs"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UTextFuncs::tableSize"] + [::std::mem::offset_of!(UTextFuncs, tableSize) - 0usize]; + ["Offset of field: UTextFuncs::reserved1"] + [::std::mem::offset_of!(UTextFuncs, reserved1) - 4usize]; + ["Offset of field: UTextFuncs::reserved2"] + [::std::mem::offset_of!(UTextFuncs, reserved2) - 8usize]; + ["Offset of field: UTextFuncs::reserved3"] + [::std::mem::offset_of!(UTextFuncs, reserved3) - 12usize]; + ["Offset of field: UTextFuncs::clone"][::std::mem::offset_of!(UTextFuncs, clone) - 16usize]; + ["Offset of field: UTextFuncs::nativeLength"] + [::std::mem::offset_of!(UTextFuncs, nativeLength) - 24usize]; + ["Offset of field: UTextFuncs::access"][::std::mem::offset_of!(UTextFuncs, access) - 32usize]; + ["Offset of field: UTextFuncs::extract"][::std::mem::offset_of!(UTextFuncs, extract) - 40usize]; + ["Offset of field: UTextFuncs::replace"][::std::mem::offset_of!(UTextFuncs, replace) - 48usize]; + ["Offset of field: UTextFuncs::copy"][::std::mem::offset_of!(UTextFuncs, copy) - 56usize]; + ["Offset of field: UTextFuncs::mapOffsetToNative"] + [::std::mem::offset_of!(UTextFuncs, mapOffsetToNative) - 64usize]; + ["Offset of field: UTextFuncs::mapNativeIndexToUTF16"] + [::std::mem::offset_of!(UTextFuncs, mapNativeIndexToUTF16) - 72usize]; + ["Offset of field: UTextFuncs::close"][::std::mem::offset_of!(UTextFuncs, close) - 80usize]; + ["Offset of field: UTextFuncs::spare1"][::std::mem::offset_of!(UTextFuncs, spare1) - 88usize]; + ["Offset of field: UTextFuncs::spare2"][::std::mem::offset_of!(UTextFuncs, spare2) - 96usize]; + ["Offset of field: UTextFuncs::spare3"][::std::mem::offset_of!(UTextFuncs, spare3) - 104usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UText { + pub magic: u32, + pub flags: i32, + pub providerProperties: i32, + pub sizeOfStruct: i32, + pub chunkNativeLimit: i64, + pub extraSize: i32, + pub nativeIndexingLimit: i32, + pub chunkNativeStart: i64, + pub chunkOffset: i32, + pub chunkLength: i32, + pub chunkContents: *const UChar, + pub pFuncs: *const UTextFuncs, + pub pExtra: *mut ::std::os::raw::c_void, + pub context: *const ::std::os::raw::c_void, + pub p: *const ::std::os::raw::c_void, + pub q: *const ::std::os::raw::c_void, + pub r: *const ::std::os::raw::c_void, + pub privP: *mut ::std::os::raw::c_void, + pub a: i64, + pub b: i32, + pub c: i32, + pub privA: i64, + pub privB: i32, + pub privC: i32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UText"][::std::mem::size_of::() - 144usize]; + ["Alignment of UText"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UText::magic"][::std::mem::offset_of!(UText, magic) - 0usize]; + ["Offset of field: UText::flags"][::std::mem::offset_of!(UText, flags) - 4usize]; + ["Offset of field: UText::providerProperties"] + [::std::mem::offset_of!(UText, providerProperties) - 8usize]; + ["Offset of field: UText::sizeOfStruct"][::std::mem::offset_of!(UText, sizeOfStruct) - 12usize]; + ["Offset of field: UText::chunkNativeLimit"] + [::std::mem::offset_of!(UText, chunkNativeLimit) - 16usize]; + ["Offset of field: UText::extraSize"][::std::mem::offset_of!(UText, extraSize) - 24usize]; + ["Offset of field: UText::nativeIndexingLimit"] + [::std::mem::offset_of!(UText, nativeIndexingLimit) - 28usize]; + ["Offset of field: UText::chunkNativeStart"] + [::std::mem::offset_of!(UText, chunkNativeStart) - 32usize]; + ["Offset of field: UText::chunkOffset"][::std::mem::offset_of!(UText, chunkOffset) - 40usize]; + ["Offset of field: UText::chunkLength"][::std::mem::offset_of!(UText, chunkLength) - 44usize]; + ["Offset of field: UText::chunkContents"] + [::std::mem::offset_of!(UText, chunkContents) - 48usize]; + ["Offset of field: UText::pFuncs"][::std::mem::offset_of!(UText, pFuncs) - 56usize]; + ["Offset of field: UText::pExtra"][::std::mem::offset_of!(UText, pExtra) - 64usize]; + ["Offset of field: UText::context"][::std::mem::offset_of!(UText, context) - 72usize]; + ["Offset of field: UText::p"][::std::mem::offset_of!(UText, p) - 80usize]; + ["Offset of field: UText::q"][::std::mem::offset_of!(UText, q) - 88usize]; + ["Offset of field: UText::r"][::std::mem::offset_of!(UText, r) - 96usize]; + ["Offset of field: UText::privP"][::std::mem::offset_of!(UText, privP) - 104usize]; + ["Offset of field: UText::a"][::std::mem::offset_of!(UText, a) - 112usize]; + ["Offset of field: UText::b"][::std::mem::offset_of!(UText, b) - 120usize]; + ["Offset of field: UText::c"][::std::mem::offset_of!(UText, c) - 124usize]; + ["Offset of field: UText::privA"][::std::mem::offset_of!(UText, privA) - 128usize]; + ["Offset of field: UText::privB"][::std::mem::offset_of!(UText, privB) - 136usize]; + ["Offset of field: UText::privC"][::std::mem::offset_of!(UText, privC) - 140usize]; +}; +impl Default for UText { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +unsafe extern "C" { + pub fn utext_setup_76(ut: *mut UText, extraSpace: i32, status: *mut UErrorCode) -> *mut UText; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UBreakIterator { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UParseError { + pub line: i32, + pub offset: i32, + pub preContext: [UChar; 16usize], + pub postContext: [UChar; 16usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UParseError"][::std::mem::size_of::() - 72usize]; + ["Alignment of UParseError"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UParseError::line"][::std::mem::offset_of!(UParseError, line) - 0usize]; + ["Offset of field: UParseError::offset"][::std::mem::offset_of!(UParseError, offset) - 4usize]; + ["Offset of field: UParseError::preContext"] + [::std::mem::offset_of!(UParseError, preContext) - 8usize]; + ["Offset of field: UParseError::postContext"] + [::std::mem::offset_of!(UParseError, postContext) - 40usize]; +}; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UBreakIteratorType { + UBRK_CHARACTER = 0, + UBRK_WORD = 1, + UBRK_LINE = 2, + UBRK_SENTENCE = 3, + UBRK_TITLE = 4, + UBRK_COUNT = 5, +} +impl UWordBreak { + pub const UBRK_WORD_NUMBER: UWordBreak = UWordBreak::UBRK_WORD_NONE_LIMIT; +} +impl UWordBreak { + pub const UBRK_WORD_LETTER: UWordBreak = UWordBreak::UBRK_WORD_NUMBER_LIMIT; +} +impl UWordBreak { + pub const UBRK_WORD_KANA: UWordBreak = UWordBreak::UBRK_WORD_LETTER_LIMIT; +} +impl UWordBreak { + pub const UBRK_WORD_IDEO: UWordBreak = UWordBreak::UBRK_WORD_KANA_LIMIT; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UWordBreak { + UBRK_WORD_NONE = 0, + UBRK_WORD_NONE_LIMIT = 100, + UBRK_WORD_NUMBER_LIMIT = 200, + UBRK_WORD_LETTER_LIMIT = 300, + UBRK_WORD_KANA_LIMIT = 400, + UBRK_WORD_IDEO_LIMIT = 500, +} +impl ULineBreakTag { + pub const UBRK_LINE_HARD: ULineBreakTag = ULineBreakTag::UBRK_LINE_SOFT_LIMIT; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum ULineBreakTag { + UBRK_LINE_SOFT = 0, + UBRK_LINE_SOFT_LIMIT = 100, + UBRK_LINE_HARD_LIMIT = 200, +} +impl USentenceBreakTag { + pub const UBRK_SENTENCE_SEP: USentenceBreakTag = USentenceBreakTag::UBRK_SENTENCE_TERM_LIMIT; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum USentenceBreakTag { + UBRK_SENTENCE_TERM = 0, + UBRK_SENTENCE_TERM_LIMIT = 100, + UBRK_SENTENCE_SEP_LIMIT = 200, +} +unsafe extern "C" { + pub fn ubrk_open_76( + type_: UBreakIteratorType, + locale: *const ::std::os::raw::c_char, + text: *const UChar, + textLength: i32, + status: *mut UErrorCode, + ) -> *mut UBreakIterator; +} +unsafe extern "C" { + pub fn ubrk_openRules_76( + rules: *const UChar, + rulesLength: i32, + text: *const UChar, + textLength: i32, + parseErr: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UBreakIterator; +} +unsafe extern "C" { + pub fn ubrk_openBinaryRules_76( + binaryRules: *const u8, + rulesLength: i32, + text: *const UChar, + textLength: i32, + status: *mut UErrorCode, + ) -> *mut UBreakIterator; +} +unsafe extern "C" { + pub fn ubrk_safeClone_76( + bi: *const UBreakIterator, + stackBuffer: *mut ::std::os::raw::c_void, + pBufferSize: *mut i32, + status: *mut UErrorCode, + ) -> *mut UBreakIterator; +} +unsafe extern "C" { + pub fn ubrk_clone_76(bi: *const UBreakIterator, status: *mut UErrorCode) + -> *mut UBreakIterator; +} +unsafe extern "C" { + pub fn ubrk_close_76(bi: *mut UBreakIterator); +} +unsafe extern "C" { + pub fn ubrk_setText_76( + bi: *mut UBreakIterator, + text: *const UChar, + textLength: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ubrk_setUText_76(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn ubrk_current_76(bi: *const UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_next_76(bi: *mut UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_previous_76(bi: *mut UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_first_76(bi: *mut UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_last_76(bi: *mut UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_preceding_76(bi: *mut UBreakIterator, offset: i32) -> i32; +} +unsafe extern "C" { + pub fn ubrk_following_76(bi: *mut UBreakIterator, offset: i32) -> i32; +} +unsafe extern "C" { + pub fn ubrk_getAvailable_76(index: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ubrk_countAvailable_76() -> i32; +} +unsafe extern "C" { + pub fn ubrk_isBoundary_76(bi: *mut UBreakIterator, offset: i32) -> UBool; +} +unsafe extern "C" { + pub fn ubrk_getRuleStatus_76(bi: *mut UBreakIterator) -> i32; +} +unsafe extern "C" { + pub fn ubrk_getRuleStatusVec_76( + bi: *mut UBreakIterator, + fillInVec: *mut i32, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ubrk_getLocaleByType_76( + bi: *const UBreakIterator, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ubrk_refreshUText_76(bi: *mut UBreakIterator, text: *mut UText, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn ubrk_getBinaryRules_76( + bi: *mut UBreakIterator, + binaryRules: *mut u8, + rulesCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +pub type UCalendar = *mut ::std::os::raw::c_void; +impl UCalendarType { + pub const UCAL_DEFAULT: UCalendarType = UCalendarType::UCAL_TRADITIONAL; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarType { + UCAL_TRADITIONAL = 0, + UCAL_GREGORIAN = 1, +} +impl UCalendarDateFields { + pub const UCAL_DAY_OF_MONTH: UCalendarDateFields = UCalendarDateFields::UCAL_DATE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarDateFields { + UCAL_ERA = 0, + UCAL_YEAR = 1, + UCAL_MONTH = 2, + UCAL_WEEK_OF_YEAR = 3, + UCAL_WEEK_OF_MONTH = 4, + UCAL_DATE = 5, + UCAL_DAY_OF_YEAR = 6, + UCAL_DAY_OF_WEEK = 7, + UCAL_DAY_OF_WEEK_IN_MONTH = 8, + UCAL_AM_PM = 9, + UCAL_HOUR = 10, + UCAL_HOUR_OF_DAY = 11, + UCAL_MINUTE = 12, + UCAL_SECOND = 13, + UCAL_MILLISECOND = 14, + UCAL_ZONE_OFFSET = 15, + UCAL_DST_OFFSET = 16, + UCAL_YEAR_WOY = 17, + UCAL_DOW_LOCAL = 18, + UCAL_EXTENDED_YEAR = 19, + UCAL_JULIAN_DAY = 20, + UCAL_MILLISECONDS_IN_DAY = 21, + UCAL_IS_LEAP_MONTH = 22, + UCAL_ORDINAL_MONTH = 23, + UCAL_FIELD_COUNT = 24, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarDaysOfWeek { + UCAL_SUNDAY = 1, + UCAL_MONDAY = 2, + UCAL_TUESDAY = 3, + UCAL_WEDNESDAY = 4, + UCAL_THURSDAY = 5, + UCAL_FRIDAY = 6, + UCAL_SATURDAY = 7, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarMonths { + UCAL_JANUARY = 0, + UCAL_FEBRUARY = 1, + UCAL_MARCH = 2, + UCAL_APRIL = 3, + UCAL_MAY = 4, + UCAL_JUNE = 5, + UCAL_JULY = 6, + UCAL_AUGUST = 7, + UCAL_SEPTEMBER = 8, + UCAL_OCTOBER = 9, + UCAL_NOVEMBER = 10, + UCAL_DECEMBER = 11, + UCAL_UNDECIMBER = 12, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarAMPMs { + UCAL_AM = 0, + UCAL_PM = 1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum USystemTimeZoneType { + UCAL_ZONE_TYPE_ANY = 0, + UCAL_ZONE_TYPE_CANONICAL = 1, + UCAL_ZONE_TYPE_CANONICAL_LOCATION = 2, +} +unsafe extern "C" { + pub fn ucal_openTimeZoneIDEnumeration_76( + zoneType: USystemTimeZoneType, + region: *const ::std::os::raw::c_char, + rawOffset: *const i32, + ec: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucal_openTimeZones_76(ec: *mut UErrorCode) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucal_openCountryTimeZones_76( + country: *const ::std::os::raw::c_char, + ec: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucal_getDefaultTimeZone_76( + result: *mut UChar, + resultCapacity: i32, + ec: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_setDefaultTimeZone_76(zoneID: *const UChar, ec: *mut UErrorCode); +} +unsafe extern "C" { + pub fn ucal_getHostTimeZone_76( + result: *mut UChar, + resultCapacity: i32, + ec: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_getDSTSavings_76(zoneID: *const UChar, ec: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ucal_getNow_76() -> UDate; +} +unsafe extern "C" { + pub fn ucal_open_76( + zoneID: *const UChar, + len: i32, + locale: *const ::std::os::raw::c_char, + type_: UCalendarType, + status: *mut UErrorCode, + ) -> *mut UCalendar; +} +unsafe extern "C" { + pub fn ucal_close_76(cal: *mut UCalendar); +} +unsafe extern "C" { + pub fn ucal_clone_76(cal: *const UCalendar, status: *mut UErrorCode) -> *mut UCalendar; +} +unsafe extern "C" { + pub fn ucal_setTimeZone_76( + cal: *mut UCalendar, + zoneID: *const UChar, + len: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_getTimeZoneID_76( + cal: *const UCalendar, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarDisplayNameType { + UCAL_STANDARD = 0, + UCAL_SHORT_STANDARD = 1, + UCAL_DST = 2, + UCAL_SHORT_DST = 3, +} +unsafe extern "C" { + pub fn ucal_getTimeZoneDisplayName_76( + cal: *const UCalendar, + type_: UCalendarDisplayNameType, + locale: *const ::std::os::raw::c_char, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_inDaylightTime_76(cal: *const UCalendar, status: *mut UErrorCode) -> UBool; +} +unsafe extern "C" { + pub fn ucal_setGregorianChange_76( + cal: *mut UCalendar, + date: UDate, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_getGregorianChange_76(cal: *const UCalendar, pErrorCode: *mut UErrorCode) -> UDate; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarAttribute { + UCAL_LENIENT = 0, + UCAL_FIRST_DAY_OF_WEEK = 1, + UCAL_MINIMAL_DAYS_IN_FIRST_WEEK = 2, + UCAL_REPEATED_WALL_TIME = 3, + UCAL_SKIPPED_WALL_TIME = 4, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarWallTimeOption { + UCAL_WALLTIME_LAST = 0, + UCAL_WALLTIME_FIRST = 1, + UCAL_WALLTIME_NEXT_VALID = 2, +} +unsafe extern "C" { + pub fn ucal_getAttribute_76(cal: *const UCalendar, attr: UCalendarAttribute) -> i32; +} +unsafe extern "C" { + pub fn ucal_setAttribute_76(cal: *mut UCalendar, attr: UCalendarAttribute, newValue: i32); +} +unsafe extern "C" { + pub fn ucal_getAvailable_76(localeIndex: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucal_countAvailable_76() -> i32; +} +unsafe extern "C" { + pub fn ucal_getMillis_76(cal: *const UCalendar, status: *mut UErrorCode) -> UDate; +} +unsafe extern "C" { + pub fn ucal_setMillis_76(cal: *mut UCalendar, dateTime: UDate, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn ucal_setDate_76( + cal: *mut UCalendar, + year: i32, + month: i32, + date: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_setDateTime_76( + cal: *mut UCalendar, + year: i32, + month: i32, + date: i32, + hour: i32, + minute: i32, + second: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_equivalentTo_76(cal1: *const UCalendar, cal2: *const UCalendar) -> UBool; +} +unsafe extern "C" { + pub fn ucal_add_76( + cal: *mut UCalendar, + field: UCalendarDateFields, + amount: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_roll_76( + cal: *mut UCalendar, + field: UCalendarDateFields, + amount: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucal_get_76( + cal: *const UCalendar, + field: UCalendarDateFields, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_set_76(cal: *mut UCalendar, field: UCalendarDateFields, value: i32); +} +unsafe extern "C" { + pub fn ucal_isSet_76(cal: *const UCalendar, field: UCalendarDateFields) -> UBool; +} +unsafe extern "C" { + pub fn ucal_clearField_76(cal: *mut UCalendar, field: UCalendarDateFields); +} +unsafe extern "C" { + pub fn ucal_clear_76(calendar: *mut UCalendar); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarLimitType { + UCAL_MINIMUM = 0, + UCAL_MAXIMUM = 1, + UCAL_GREATEST_MINIMUM = 2, + UCAL_LEAST_MAXIMUM = 3, + UCAL_ACTUAL_MINIMUM = 4, + UCAL_ACTUAL_MAXIMUM = 5, +} +unsafe extern "C" { + pub fn ucal_getLimit_76( + cal: *const UCalendar, + field: UCalendarDateFields, + type_: UCalendarLimitType, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_getLocaleByType_76( + cal: *const UCalendar, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucal_getTZDataVersion_76(status: *mut UErrorCode) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucal_getCanonicalTimeZoneID_76( + id: *const UChar, + len: i32, + result: *mut UChar, + resultCapacity: i32, + isSystemID: *mut UBool, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_getIanaTimeZoneID_76( + id: *const UChar, + len: i32, + result: *mut UChar, + resultCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_getType_76( + cal: *const UCalendar, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucal_getKeywordValuesForLocale_76( + key: *const ::std::os::raw::c_char, + locale: *const ::std::os::raw::c_char, + commonlyUsed: UBool, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCalendarWeekdayType { + UCAL_WEEKDAY = 0, + UCAL_WEEKEND = 1, + UCAL_WEEKEND_ONSET = 2, + UCAL_WEEKEND_CEASE = 3, +} +unsafe extern "C" { + pub fn ucal_getDayOfWeekType_76( + cal: *const UCalendar, + dayOfWeek: UCalendarDaysOfWeek, + status: *mut UErrorCode, + ) -> UCalendarWeekdayType; +} +unsafe extern "C" { + pub fn ucal_getWeekendTransition_76( + cal: *const UCalendar, + dayOfWeek: UCalendarDaysOfWeek, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_isWeekend_76(cal: *const UCalendar, date: UDate, status: *mut UErrorCode) -> UBool; +} +unsafe extern "C" { + pub fn ucal_getFieldDifference_76( + cal: *mut UCalendar, + target: UDate, + field: UCalendarDateFields, + status: *mut UErrorCode, + ) -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UTimeZoneTransitionType { + UCAL_TZ_TRANSITION_NEXT = 0, + UCAL_TZ_TRANSITION_NEXT_INCLUSIVE = 1, + UCAL_TZ_TRANSITION_PREVIOUS = 2, + UCAL_TZ_TRANSITION_PREVIOUS_INCLUSIVE = 3, +} +unsafe extern "C" { + pub fn ucal_getTimeZoneTransitionDate_76( + cal: *const UCalendar, + type_: UTimeZoneTransitionType, + transition: *mut UDate, + status: *mut UErrorCode, + ) -> UBool; +} +unsafe extern "C" { + pub fn ucal_getWindowsTimeZoneID_76( + id: *const UChar, + len: i32, + winid: *mut UChar, + winidCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucal_getTimeZoneIDForWindowsID_76( + winid: *const UChar, + len: i32, + region: *const ::std::os::raw::c_char, + id: *mut UChar, + idCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UTimeZoneLocalOption { + UCAL_TZ_LOCAL_FORMER = 4, + UCAL_TZ_LOCAL_LATTER = 12, + UCAL_TZ_LOCAL_STANDARD_FORMER = 5, + UCAL_TZ_LOCAL_STANDARD_LATTER = 13, + UCAL_TZ_LOCAL_DAYLIGHT_FORMER = 7, + UCAL_TZ_LOCAL_DAYLIGHT_LATTER = 15, +} +unsafe extern "C" { + pub fn ucal_getTimeZoneOffsetFromLocal_76( + cal: *const UCalendar, + nonExistingTimeOpt: UTimeZoneLocalOption, + duplicatedTimeOpt: UTimeZoneLocalOption, + rawOffset: *mut i32, + dstOffset: *mut i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn u_init_76(status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn u_cleanup_76(); +} +pub type UMemAllocFn = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void, +>; +pub type UMemReallocFn = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + mem: *mut ::std::os::raw::c_void, + size: usize, + ) -> *mut ::std::os::raw::c_void, +>; +pub type UMemFreeFn = ::std::option::Option< + unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mem: *mut ::std::os::raw::c_void), +>; +unsafe extern "C" { + pub fn u_setMemoryFunctions_76( + context: *const ::std::os::raw::c_void, + a: UMemAllocFn, + r: UMemReallocFn, + f: UMemFreeFn, + status: *mut UErrorCode, + ); +} +pub type UMTX = *mut ::std::os::raw::c_void; +pub type UMtxInitFn = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + mutex: *mut UMTX, + status: *mut UErrorCode, + ), +>; +pub type UMtxFn = ::std::option::Option< + unsafe extern "C" fn(context: *const ::std::os::raw::c_void, mutex: *mut UMTX), +>; +unsafe extern "C" { + pub fn u_setMutexFunctions_76( + context: *const ::std::os::raw::c_void, + init: UMtxInitFn, + destroy: UMtxFn, + lock: UMtxFn, + unlock: UMtxFn, + status: *mut UErrorCode, + ); +} +pub type UMtxAtomicFn = ::std::option::Option< + unsafe extern "C" fn(context: *const ::std::os::raw::c_void, p: *mut i32) -> i32, +>; +unsafe extern "C" { + pub fn u_setAtomicIncDecFunctions_76( + context: *const ::std::os::raw::c_void, + inc: UMtxAtomicFn, + dec: UMtxAtomicFn, + status: *mut UErrorCode, + ); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UConverter { + _unused: [u8; 0], +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UConverterCallbackReason { + UCNV_UNASSIGNED = 0, + UCNV_ILLEGAL = 1, + UCNV_IRREGULAR = 2, + UCNV_RESET = 3, + UCNV_CLOSE = 4, + UCNV_CLONE = 5, +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UConverterFromUnicodeArgs { + pub size: u16, + pub flush: UBool, + pub converter: *mut UConverter, + pub source: *const UChar, + pub sourceLimit: *const UChar, + pub target: *mut ::std::os::raw::c_char, + pub targetLimit: *const ::std::os::raw::c_char, + pub offsets: *mut i32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterFromUnicodeArgs"] + [::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterFromUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterFromUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterFromUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterFromUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterFromUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterFromUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterFromUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterFromUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterFromUnicodeArgs, offsets) - 48usize]; +}; +impl Default for UConverterFromUnicodeArgs { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UConverterToUnicodeArgs { + pub size: u16, + pub flush: UBool, + pub converter: *mut UConverter, + pub source: *const ::std::os::raw::c_char, + pub sourceLimit: *const ::std::os::raw::c_char, + pub target: *mut UChar, + pub targetLimit: *const UChar, + pub offsets: *mut i32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UConverterToUnicodeArgs"][::std::mem::size_of::() - 56usize]; + ["Alignment of UConverterToUnicodeArgs"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::size"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, size) - 0usize]; + ["Offset of field: UConverterToUnicodeArgs::flush"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, flush) - 2usize]; + ["Offset of field: UConverterToUnicodeArgs::converter"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, converter) - 8usize]; + ["Offset of field: UConverterToUnicodeArgs::source"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, source) - 16usize]; + ["Offset of field: UConverterToUnicodeArgs::sourceLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, sourceLimit) - 24usize]; + ["Offset of field: UConverterToUnicodeArgs::target"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, target) - 32usize]; + ["Offset of field: UConverterToUnicodeArgs::targetLimit"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, targetLimit) - 40usize]; + ["Offset of field: UConverterToUnicodeArgs::offsets"] + [::std::mem::offset_of!(UConverterToUnicodeArgs, offsets) - 48usize]; +}; +impl Default for UConverterToUnicodeArgs { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +impl UConverterType { + pub const UCNV_LMBCS_LAST: UConverterType = UConverterType::UCNV_LMBCS_19; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UConverterType { + UCNV_UNSUPPORTED_CONVERTER = -1, + UCNV_SBCS = 0, + UCNV_DBCS = 1, + UCNV_MBCS = 2, + UCNV_LATIN_1 = 3, + UCNV_UTF8 = 4, + UCNV_UTF16_BigEndian = 5, + UCNV_UTF16_LittleEndian = 6, + UCNV_UTF32_BigEndian = 7, + UCNV_UTF32_LittleEndian = 8, + UCNV_EBCDIC_STATEFUL = 9, + UCNV_ISO_2022 = 10, + UCNV_LMBCS_1 = 11, + UCNV_LMBCS_2 = 12, + UCNV_LMBCS_3 = 13, + UCNV_LMBCS_4 = 14, + UCNV_LMBCS_5 = 15, + UCNV_LMBCS_6 = 16, + UCNV_LMBCS_8 = 17, + UCNV_LMBCS_11 = 18, + UCNV_LMBCS_16 = 19, + UCNV_LMBCS_17 = 20, + UCNV_LMBCS_18 = 21, + UCNV_LMBCS_19 = 22, + UCNV_HZ = 23, + UCNV_SCSU = 24, + UCNV_ISCII = 25, + UCNV_US_ASCII = 26, + UCNV_UTF7 = 27, + UCNV_BOCU1 = 28, + UCNV_UTF16 = 29, + UCNV_UTF32 = 30, + UCNV_CESU8 = 31, + UCNV_IMAP_MAILBOX = 32, + UCNV_COMPOUND_TEXT = 33, + UCNV_NUMBER_OF_SUPPORTED_CONVERTER_TYPES = 34, +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UConverterPlatform { + UCNV_UNKNOWN = -1, + UCNV_IBM = 0, +} +pub type UConverterToUCallback = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + args: *mut UConverterToUnicodeArgs, + codeUnits: *const ::std::os::raw::c_char, + length: i32, + reason: UConverterCallbackReason, + pErrorCode: *mut UErrorCode, + ), +>; +pub type UConverterFromUCallback = ::std::option::Option< + unsafe extern "C" fn( + context: *const ::std::os::raw::c_void, + args: *mut UConverterFromUnicodeArgs, + codeUnits: *const UChar, + length: i32, + codePoint: UChar32, + reason: UConverterCallbackReason, + pErrorCode: *mut UErrorCode, + ), +>; +unsafe extern "C" { + pub fn ucnv_compareNames_76( + name1: *const ::std::os::raw::c_char, + name2: *const ::std::os::raw::c_char, + ) -> ::std::os::raw::c_int; +} +unsafe extern "C" { + pub fn ucnv_open_76( + converterName: *const ::std::os::raw::c_char, + err: *mut UErrorCode, + ) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_openU_76(name: *const UChar, err: *mut UErrorCode) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_openCCSID_76( + codepage: i32, + platform: UConverterPlatform, + err: *mut UErrorCode, + ) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_openPackage_76( + packageName: *const ::std::os::raw::c_char, + converterName: *const ::std::os::raw::c_char, + err: *mut UErrorCode, + ) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_clone_76(cnv: *const UConverter, status: *mut UErrorCode) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_safeClone_76( + cnv: *const UConverter, + stackBuffer: *mut ::std::os::raw::c_void, + pBufferSize: *mut i32, + status: *mut UErrorCode, + ) -> *mut UConverter; +} +unsafe extern "C" { + pub fn ucnv_close_76(converter: *mut UConverter); +} +unsafe extern "C" { + pub fn ucnv_getSubstChars_76( + converter: *const UConverter, + subChars: *mut ::std::os::raw::c_char, + len: *mut i8, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_setSubstChars_76( + converter: *mut UConverter, + subChars: *const ::std::os::raw::c_char, + len: i8, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_setSubstString_76( + cnv: *mut UConverter, + s: *const UChar, + length: i32, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_getInvalidChars_76( + converter: *const UConverter, + errBytes: *mut ::std::os::raw::c_char, + len: *mut i8, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_getInvalidUChars_76( + converter: *const UConverter, + errUChars: *mut UChar, + len: *mut i8, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_reset_76(converter: *mut UConverter); +} +unsafe extern "C" { + pub fn ucnv_resetToUnicode_76(converter: *mut UConverter); +} +unsafe extern "C" { + pub fn ucnv_resetFromUnicode_76(converter: *mut UConverter); +} +unsafe extern "C" { + pub fn ucnv_getMaxCharSize_76(converter: *const UConverter) -> i8; +} +unsafe extern "C" { + pub fn ucnv_getMinCharSize_76(converter: *const UConverter) -> i8; +} +unsafe extern "C" { + pub fn ucnv_getDisplayName_76( + converter: *const UConverter, + displayLocale: *const ::std::os::raw::c_char, + displayName: *mut UChar, + displayNameCapacity: i32, + err: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_getName_76( + converter: *const UConverter, + err: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_getCCSID_76(converter: *const UConverter, err: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ucnv_getPlatform_76( + converter: *const UConverter, + err: *mut UErrorCode, + ) -> UConverterPlatform; +} +unsafe extern "C" { + pub fn ucnv_getType_76(converter: *const UConverter) -> UConverterType; +} +unsafe extern "C" { + pub fn ucnv_getStarters_76( + converter: *const UConverter, + starters: *mut UBool, + err: *mut UErrorCode, + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UConverterUnicodeSet { + UCNV_ROUNDTRIP_SET = 0, + UCNV_ROUNDTRIP_AND_FALLBACK_SET = 1, + UCNV_SET_COUNT = 2, +} +unsafe extern "C" { + pub fn ucnv_getUnicodeSet_76( + cnv: *const UConverter, + setFillIn: *mut USet, + whichSet: UConverterUnicodeSet, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_getToUCallBack_76( + converter: *const UConverter, + action: *mut UConverterToUCallback, + context: *mut *const ::std::os::raw::c_void, + ); +} +unsafe extern "C" { + pub fn ucnv_getFromUCallBack_76( + converter: *const UConverter, + action: *mut UConverterFromUCallback, + context: *mut *const ::std::os::raw::c_void, + ); +} +unsafe extern "C" { + pub fn ucnv_setToUCallBack_76( + converter: *mut UConverter, + newAction: UConverterToUCallback, + newContext: *const ::std::os::raw::c_void, + oldAction: *mut UConverterToUCallback, + oldContext: *mut *const ::std::os::raw::c_void, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_setFromUCallBack_76( + converter: *mut UConverter, + newAction: UConverterFromUCallback, + newContext: *const ::std::os::raw::c_void, + oldAction: *mut UConverterFromUCallback, + oldContext: *mut *const ::std::os::raw::c_void, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_fromUnicode_76( + converter: *mut UConverter, + target: *mut *mut ::std::os::raw::c_char, + targetLimit: *const ::std::os::raw::c_char, + source: *mut *const UChar, + sourceLimit: *const UChar, + offsets: *mut i32, + flush: UBool, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_toUnicode_76( + converter: *mut UConverter, + target: *mut *mut UChar, + targetLimit: *const UChar, + source: *mut *const ::std::os::raw::c_char, + sourceLimit: *const ::std::os::raw::c_char, + offsets: *mut i32, + flush: UBool, + err: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_fromUChars_76( + cnv: *mut UConverter, + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + src: *const UChar, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_toUChars_76( + cnv: *mut UConverter, + dest: *mut UChar, + destCapacity: i32, + src: *const ::std::os::raw::c_char, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_getNextUChar_76( + converter: *mut UConverter, + source: *mut *const ::std::os::raw::c_char, + sourceLimit: *const ::std::os::raw::c_char, + err: *mut UErrorCode, + ) -> UChar32; +} +unsafe extern "C" { + pub fn ucnv_convertEx_76( + targetCnv: *mut UConverter, + sourceCnv: *mut UConverter, + target: *mut *mut ::std::os::raw::c_char, + targetLimit: *const ::std::os::raw::c_char, + source: *mut *const ::std::os::raw::c_char, + sourceLimit: *const ::std::os::raw::c_char, + pivotStart: *mut UChar, + pivotSource: *mut *mut UChar, + pivotTarget: *mut *mut UChar, + pivotLimit: *const UChar, + reset: UBool, + flush: UBool, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_convert_76( + toConverterName: *const ::std::os::raw::c_char, + fromConverterName: *const ::std::os::raw::c_char, + target: *mut ::std::os::raw::c_char, + targetCapacity: i32, + source: *const ::std::os::raw::c_char, + sourceLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_toAlgorithmic_76( + algorithmicType: UConverterType, + cnv: *mut UConverter, + target: *mut ::std::os::raw::c_char, + targetCapacity: i32, + source: *const ::std::os::raw::c_char, + sourceLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_fromAlgorithmic_76( + cnv: *mut UConverter, + algorithmicType: UConverterType, + target: *mut ::std::os::raw::c_char, + targetCapacity: i32, + source: *const ::std::os::raw::c_char, + sourceLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucnv_flushCache_76() -> i32; +} +unsafe extern "C" { + pub fn ucnv_countAvailable_76() -> i32; +} +unsafe extern "C" { + pub fn ucnv_getAvailableName_76(n: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_openAllNames_76(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucnv_countAliases_76( + alias: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> u16; +} +unsafe extern "C" { + pub fn ucnv_getAlias_76( + alias: *const ::std::os::raw::c_char, + n: u16, + pErrorCode: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_getAliases_76( + alias: *const ::std::os::raw::c_char, + aliases: *mut *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucnv_openStandardNames_76( + convName: *const ::std::os::raw::c_char, + standard: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucnv_countStandards_76() -> u16; +} +unsafe extern "C" { + pub fn ucnv_getStandard_76( + n: u16, + pErrorCode: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_getStandardName_76( + name: *const ::std::os::raw::c_char, + standard: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_getCanonicalName_76( + alias: *const ::std::os::raw::c_char, + standard: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_getDefaultName_76() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_setDefaultName_76(name: *const ::std::os::raw::c_char); +} +unsafe extern "C" { + pub fn ucnv_fixFileSeparator_76(cnv: *const UConverter, source: *mut UChar, sourceLen: i32); +} +unsafe extern "C" { + pub fn ucnv_isAmbiguous_76(cnv: *const UConverter) -> UBool; +} +unsafe extern "C" { + pub fn ucnv_setFallback_76(cnv: *mut UConverter, usesFallback: UBool); +} +unsafe extern "C" { + pub fn ucnv_usesFallback_76(cnv: *const UConverter) -> UBool; +} +unsafe extern "C" { + pub fn ucnv_detectUnicodeSignature_76( + source: *const ::std::os::raw::c_char, + sourceLength: i32, + signatureLength: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucnv_fromUCountPending_76(cnv: *const UConverter, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ucnv_toUCountPending_76(cnv: *const UConverter, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ucnv_isFixedWidth_76(cnv: *mut UConverter, status: *mut UErrorCode) -> UBool; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCharIteratorOrigin { + UITER_START = 0, + UITER_CURRENT = 1, + UITER_LIMIT = 2, + UITER_ZERO = 3, + UITER_LENGTH = 4, +} +pub type UCharIteratorGetIndex = ::std::option::Option< + unsafe extern "C" fn(iter: *mut UCharIterator, origin: UCharIteratorOrigin) -> i32, +>; +pub type UCharIteratorMove = ::std::option::Option< + unsafe extern "C" fn(iter: *mut UCharIterator, delta: i32, origin: UCharIteratorOrigin) -> i32, +>; +pub type UCharIteratorHasNext = + ::std::option::Option UBool>; +pub type UCharIteratorHasPrevious = + ::std::option::Option UBool>; +pub type UCharIteratorCurrent = + ::std::option::Option UChar32>; +pub type UCharIteratorNext = + ::std::option::Option UChar32>; +pub type UCharIteratorPrevious = + ::std::option::Option UChar32>; +pub type UCharIteratorReserved = + ::std::option::Option i32>; +pub type UCharIteratorGetState = + ::std::option::Option u32>; +pub type UCharIteratorSetState = ::std::option::Option< + unsafe extern "C" fn(iter: *mut UCharIterator, state: u32, pErrorCode: *mut UErrorCode), +>; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UCharIterator { + pub context: *const ::std::os::raw::c_void, + pub length: i32, + pub start: i32, + pub index: i32, + pub limit: i32, + pub reservedField: i32, + pub getIndex: UCharIteratorGetIndex, + pub move_: UCharIteratorMove, + pub hasNext: UCharIteratorHasNext, + pub hasPrevious: UCharIteratorHasPrevious, + pub current: UCharIteratorCurrent, + pub next: UCharIteratorNext, + pub previous: UCharIteratorPrevious, + pub reservedFn: UCharIteratorReserved, + pub getState: UCharIteratorGetState, + pub setState: UCharIteratorSetState, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCharIterator"][::std::mem::size_of::() - 112usize]; + ["Alignment of UCharIterator"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCharIterator::context"] + [::std::mem::offset_of!(UCharIterator, context) - 0usize]; + ["Offset of field: UCharIterator::length"] + [::std::mem::offset_of!(UCharIterator, length) - 8usize]; + ["Offset of field: UCharIterator::start"] + [::std::mem::offset_of!(UCharIterator, start) - 12usize]; + ["Offset of field: UCharIterator::index"] + [::std::mem::offset_of!(UCharIterator, index) - 16usize]; + ["Offset of field: UCharIterator::limit"] + [::std::mem::offset_of!(UCharIterator, limit) - 20usize]; + ["Offset of field: UCharIterator::reservedField"] + [::std::mem::offset_of!(UCharIterator, reservedField) - 24usize]; + ["Offset of field: UCharIterator::getIndex"] + [::std::mem::offset_of!(UCharIterator, getIndex) - 32usize]; + ["Offset of field: UCharIterator::move_"] + [::std::mem::offset_of!(UCharIterator, move_) - 40usize]; + ["Offset of field: UCharIterator::hasNext"] + [::std::mem::offset_of!(UCharIterator, hasNext) - 48usize]; + ["Offset of field: UCharIterator::hasPrevious"] + [::std::mem::offset_of!(UCharIterator, hasPrevious) - 56usize]; + ["Offset of field: UCharIterator::current"] + [::std::mem::offset_of!(UCharIterator, current) - 64usize]; + ["Offset of field: UCharIterator::next"][::std::mem::offset_of!(UCharIterator, next) - 72usize]; + ["Offset of field: UCharIterator::previous"] + [::std::mem::offset_of!(UCharIterator, previous) - 80usize]; + ["Offset of field: UCharIterator::reservedFn"] + [::std::mem::offset_of!(UCharIterator, reservedFn) - 88usize]; + ["Offset of field: UCharIterator::getState"] + [::std::mem::offset_of!(UCharIterator, getState) - 96usize]; + ["Offset of field: UCharIterator::setState"] + [::std::mem::offset_of!(UCharIterator, setState) - 104usize]; +}; +impl Default for UCharIterator { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNormalization2Mode { + UNORM2_COMPOSE = 0, + UNORM2_DECOMPOSE = 1, + UNORM2_FCD = 2, + UNORM2_COMPOSE_CONTIGUOUS = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNormalizationCheckResult { + UNORM_NO = 0, + UNORM_YES = 1, + UNORM_MAYBE = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UNormalizer2 { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn unorm2_getNFCInstance_76(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getNFDInstance_76(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getNFKCInstance_76(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getNFKDInstance_76(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getNFKCCasefoldInstance_76(pErrorCode: *mut UErrorCode) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getNFKCSimpleCasefoldInstance_76( + pErrorCode: *mut UErrorCode, + ) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_getInstance_76( + packageName: *const ::std::os::raw::c_char, + name: *const ::std::os::raw::c_char, + mode: UNormalization2Mode, + pErrorCode: *mut UErrorCode, + ) -> *const UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_openFiltered_76( + norm2: *const UNormalizer2, + filterSet: *const USet, + pErrorCode: *mut UErrorCode, + ) -> *mut UNormalizer2; +} +unsafe extern "C" { + pub fn unorm2_close_76(norm2: *mut UNormalizer2); +} +unsafe extern "C" { + pub fn unorm2_normalize_76( + norm2: *const UNormalizer2, + src: *const UChar, + length: i32, + dest: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_normalizeSecondAndAppend_76( + norm2: *const UNormalizer2, + first: *mut UChar, + firstLength: i32, + firstCapacity: i32, + second: *const UChar, + secondLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_append_76( + norm2: *const UNormalizer2, + first: *mut UChar, + firstLength: i32, + firstCapacity: i32, + second: *const UChar, + secondLength: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_getDecomposition_76( + norm2: *const UNormalizer2, + c: UChar32, + decomposition: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_getRawDecomposition_76( + norm2: *const UNormalizer2, + c: UChar32, + decomposition: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_composePair_76(norm2: *const UNormalizer2, a: UChar32, b: UChar32) -> UChar32; +} +unsafe extern "C" { + pub fn unorm2_getCombiningClass_76(norm2: *const UNormalizer2, c: UChar32) -> u8; +} +unsafe extern "C" { + pub fn unorm2_isNormalized_76( + norm2: *const UNormalizer2, + s: *const UChar, + length: i32, + pErrorCode: *mut UErrorCode, + ) -> UBool; +} +unsafe extern "C" { + pub fn unorm2_quickCheck_76( + norm2: *const UNormalizer2, + s: *const UChar, + length: i32, + pErrorCode: *mut UErrorCode, + ) -> UNormalizationCheckResult; +} +unsafe extern "C" { + pub fn unorm2_spanQuickCheckYes_76( + norm2: *const UNormalizer2, + s: *const UChar, + length: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unorm2_hasBoundaryBefore_76(norm2: *const UNormalizer2, c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn unorm2_hasBoundaryAfter_76(norm2: *const UNormalizer2, c: UChar32) -> UBool; +} +unsafe extern "C" { + pub fn unorm2_isInert_76(norm2: *const UNormalizer2, c: UChar32) -> UBool; +} +impl UNormalizationMode { + pub const UNORM_DEFAULT: UNormalizationMode = UNormalizationMode::UNORM_NFC; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNormalizationMode { + UNORM_NONE = 1, + UNORM_NFD = 2, + UNORM_NFKD = 3, + UNORM_NFC = 4, + UNORM_NFKC = 5, + UNORM_FCD = 6, + UNORM_MODE_COUNT = 7, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UCollator { + _unused: [u8; 0], +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCollationResult { + UCOL_EQUAL = 0, + UCOL_GREATER = 1, + UCOL_LESS = -1, +} +impl UColAttributeValue { + pub const UCOL_DEFAULT_STRENGTH: UColAttributeValue = UColAttributeValue::UCOL_TERTIARY; +} +impl UColAttributeValue { + pub const UCOL_QUATERNARY: UColAttributeValue = UColAttributeValue::UCOL_CE_STRENGTH_LIMIT; +} +impl UColAttributeValue { + pub const UCOL_OFF: UColAttributeValue = UColAttributeValue::UCOL_STRENGTH_LIMIT; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UColAttributeValue { + UCOL_DEFAULT = -1, + UCOL_PRIMARY = 0, + UCOL_SECONDARY = 1, + UCOL_TERTIARY = 2, + UCOL_CE_STRENGTH_LIMIT = 3, + UCOL_IDENTICAL = 15, + UCOL_STRENGTH_LIMIT = 16, + UCOL_ON = 17, + UCOL_SHIFTED = 20, + UCOL_NON_IGNORABLE = 21, + UCOL_LOWER_FIRST = 24, + UCOL_UPPER_FIRST = 25, + UCOL_ATTRIBUTE_VALUE_COUNT = 26, +} +impl UColReorderCode { + pub const UCOL_REORDER_CODE_OTHERS: UColReorderCode = UColReorderCode::UCOL_REORDER_CODE_NONE; +} +impl UColReorderCode { + pub const UCOL_REORDER_CODE_FIRST: UColReorderCode = UColReorderCode::UCOL_REORDER_CODE_SPACE; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UColReorderCode { + UCOL_REORDER_CODE_DEFAULT = -1, + UCOL_REORDER_CODE_NONE = 103, + UCOL_REORDER_CODE_SPACE = 4096, + UCOL_REORDER_CODE_PUNCTUATION = 4097, + UCOL_REORDER_CODE_SYMBOL = 4098, + UCOL_REORDER_CODE_CURRENCY = 4099, + UCOL_REORDER_CODE_DIGIT = 4100, + UCOL_REORDER_CODE_LIMIT = 4101, +} +pub use self::UColAttributeValue as UCollationStrength; +impl UColAttribute { + pub const UCOL_DECOMPOSITION_MODE: UColAttribute = UColAttribute::UCOL_NORMALIZATION_MODE; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UColAttribute { + UCOL_FRENCH_COLLATION = 0, + UCOL_ALTERNATE_HANDLING = 1, + UCOL_CASE_FIRST = 2, + UCOL_CASE_LEVEL = 3, + UCOL_NORMALIZATION_MODE = 4, + UCOL_STRENGTH = 5, + UCOL_HIRAGANA_QUATERNARY_MODE = 6, + UCOL_NUMERIC_COLLATION = 7, + UCOL_ATTRIBUTE_COUNT = 8, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UColRuleOption { + UCOL_TAILORING_ONLY = 0, + UCOL_FULL_RULES = 1, +} +unsafe extern "C" { + pub fn ucol_open_76( + loc: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> *mut UCollator; +} +unsafe extern "C" { + pub fn ucol_openRules_76( + rules: *const UChar, + rulesLength: i32, + normalizationMode: UColAttributeValue, + strength: UCollationStrength, + parseError: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UCollator; +} +unsafe extern "C" { + pub fn ucol_openFromShortString_76( + definition: *const ::std::os::raw::c_char, + forceDefaults: UBool, + parseError: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UCollator; +} +unsafe extern "C" { + pub fn ucol_getContractions_76( + coll: *const UCollator, + conts: *mut USet, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getContractionsAndExpansions_76( + coll: *const UCollator, + contractions: *mut USet, + expansions: *mut USet, + addPrefixes: UBool, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucol_close_76(coll: *mut UCollator); +} +unsafe extern "C" { + pub fn ucol_strcoll_76( + coll: *const UCollator, + source: *const UChar, + sourceLength: i32, + target: *const UChar, + targetLength: i32, + ) -> UCollationResult; +} +unsafe extern "C" { + pub fn ucol_strcollUTF8_76( + coll: *const UCollator, + source: *const ::std::os::raw::c_char, + sourceLength: i32, + target: *const ::std::os::raw::c_char, + targetLength: i32, + status: *mut UErrorCode, + ) -> UCollationResult; +} +unsafe extern "C" { + pub fn ucol_greater_76( + coll: *const UCollator, + source: *const UChar, + sourceLength: i32, + target: *const UChar, + targetLength: i32, + ) -> UBool; +} +unsafe extern "C" { + pub fn ucol_greaterOrEqual_76( + coll: *const UCollator, + source: *const UChar, + sourceLength: i32, + target: *const UChar, + targetLength: i32, + ) -> UBool; +} +unsafe extern "C" { + pub fn ucol_equal_76( + coll: *const UCollator, + source: *const UChar, + sourceLength: i32, + target: *const UChar, + targetLength: i32, + ) -> UBool; +} +unsafe extern "C" { + pub fn ucol_strcollIter_76( + coll: *const UCollator, + sIter: *mut UCharIterator, + tIter: *mut UCharIterator, + status: *mut UErrorCode, + ) -> UCollationResult; +} +unsafe extern "C" { + pub fn ucol_getStrength_76(coll: *const UCollator) -> UCollationStrength; +} +unsafe extern "C" { + pub fn ucol_setStrength_76(coll: *mut UCollator, strength: UCollationStrength); +} +unsafe extern "C" { + pub fn ucol_getReorderCodes_76( + coll: *const UCollator, + dest: *mut i32, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_setReorderCodes_76( + coll: *mut UCollator, + reorderCodes: *const i32, + reorderCodesLength: i32, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucol_getEquivalentReorderCodes_76( + reorderCode: i32, + dest: *mut i32, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getDisplayName_76( + objLoc: *const ::std::os::raw::c_char, + dispLoc: *const ::std::os::raw::c_char, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getAvailable_76(localeIndex: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucol_countAvailable_76() -> i32; +} +unsafe extern "C" { + pub fn ucol_openAvailableLocales_76(status: *mut UErrorCode) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucol_getKeywords_76(status: *mut UErrorCode) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucol_getKeywordValues_76( + keyword: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucol_getKeywordValuesForLocale_76( + key: *const ::std::os::raw::c_char, + locale: *const ::std::os::raw::c_char, + commonlyUsed: UBool, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucol_getFunctionalEquivalent_76( + result: *mut ::std::os::raw::c_char, + resultCapacity: i32, + keyword: *const ::std::os::raw::c_char, + locale: *const ::std::os::raw::c_char, + isAvailable: *mut UBool, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getRules_76(coll: *const UCollator, length: *mut i32) -> *const UChar; +} +unsafe extern "C" { + pub fn ucol_getShortDefinitionString_76( + coll: *const UCollator, + locale: *const ::std::os::raw::c_char, + buffer: *mut ::std::os::raw::c_char, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_normalizeShortDefinitionString_76( + source: *const ::std::os::raw::c_char, + destination: *mut ::std::os::raw::c_char, + capacity: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getSortKey_76( + coll: *const UCollator, + source: *const UChar, + sourceLength: i32, + result: *mut u8, + resultLength: i32, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_nextSortKeyPart_76( + coll: *const UCollator, + iter: *mut UCharIterator, + state: *mut u32, + dest: *mut u8, + count: i32, + status: *mut UErrorCode, + ) -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UColBoundMode { + UCOL_BOUND_LOWER = 0, + UCOL_BOUND_UPPER = 1, + UCOL_BOUND_UPPER_LONG = 2, + UCOL_BOUND_VALUE_COUNT = 3, +} +unsafe extern "C" { + pub fn ucol_getBound_76( + source: *const u8, + sourceLength: i32, + boundType: UColBoundMode, + noOfLevels: u32, + result: *mut u8, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getVersion_76(coll: *const UCollator, info: *mut u8); +} +unsafe extern "C" { + pub fn ucol_getUCAVersion_76(coll: *const UCollator, info: *mut u8); +} +unsafe extern "C" { + pub fn ucol_mergeSortkeys_76( + src1: *const u8, + src1Length: i32, + src2: *const u8, + src2Length: i32, + dest: *mut u8, + destCapacity: i32, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_setAttribute_76( + coll: *mut UCollator, + attr: UColAttribute, + value: UColAttributeValue, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucol_getAttribute_76( + coll: *const UCollator, + attr: UColAttribute, + status: *mut UErrorCode, + ) -> UColAttributeValue; +} +unsafe extern "C" { + pub fn ucol_setMaxVariable_76( + coll: *mut UCollator, + group: UColReorderCode, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucol_getMaxVariable_76(coll: *const UCollator) -> UColReorderCode; +} +unsafe extern "C" { + pub fn ucol_setVariableTop_76( + coll: *mut UCollator, + varTop: *const UChar, + len: i32, + status: *mut UErrorCode, + ) -> u32; +} +unsafe extern "C" { + pub fn ucol_getVariableTop_76(coll: *const UCollator, status: *mut UErrorCode) -> u32; +} +unsafe extern "C" { + pub fn ucol_restoreVariableTop_76(coll: *mut UCollator, varTop: u32, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn ucol_clone_76(coll: *const UCollator, status: *mut UErrorCode) -> *mut UCollator; +} +unsafe extern "C" { + pub fn ucol_safeClone_76( + coll: *const UCollator, + stackBuffer: *mut ::std::os::raw::c_void, + pBufferSize: *mut i32, + status: *mut UErrorCode, + ) -> *mut UCollator; +} +unsafe extern "C" { + pub fn ucol_getRulesEx_76( + coll: *const UCollator, + delta: UColRuleOption, + buffer: *mut UChar, + bufferLen: i32, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_getLocale_76( + coll: *const UCollator, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucol_getLocaleByType_76( + coll: *const UCollator, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucol_getTailoredSet_76(coll: *const UCollator, status: *mut UErrorCode) -> *mut USet; +} +unsafe extern "C" { + pub fn ucol_getUnsafeSet_76( + coll: *const UCollator, + unsafe_: *mut USet, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_prepareShortStringOpen_76( + definition: *const ::std::os::raw::c_char, + forceDefaults: UBool, + parseError: *mut UParseError, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucol_cloneBinary_76( + coll: *const UCollator, + buffer: *mut u8, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucol_openBinary_76( + bin: *const u8, + length: i32, + base: *const UCollator, + status: *mut UErrorCode, + ) -> *mut UCollator; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UCharsetDetector { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UCharsetMatch { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn ucsdet_open_76(status: *mut UErrorCode) -> *mut UCharsetDetector; +} +unsafe extern "C" { + pub fn ucsdet_close_76(ucsd: *mut UCharsetDetector); +} +unsafe extern "C" { + pub fn ucsdet_setText_76( + ucsd: *mut UCharsetDetector, + textIn: *const ::std::os::raw::c_char, + len: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucsdet_setDeclaredEncoding_76( + ucsd: *mut UCharsetDetector, + encoding: *const ::std::os::raw::c_char, + length: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn ucsdet_detect_76( + ucsd: *mut UCharsetDetector, + status: *mut UErrorCode, + ) -> *const UCharsetMatch; +} +unsafe extern "C" { + pub fn ucsdet_detectAll_76( + ucsd: *mut UCharsetDetector, + matchesFound: *mut i32, + status: *mut UErrorCode, + ) -> *mut *const UCharsetMatch; +} +unsafe extern "C" { + pub fn ucsdet_getName_76( + ucsm: *const UCharsetMatch, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucsdet_getConfidence_76(ucsm: *const UCharsetMatch, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ucsdet_getLanguage_76( + ucsm: *const UCharsetMatch, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn ucsdet_getUChars_76( + ucsm: *const UCharsetMatch, + buf: *mut UChar, + cap: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucsdet_getAllDetectableCharsets_76( + ucsd: *const UCharsetDetector, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucsdet_isInputFilterEnabled_76(ucsd: *const UCharsetDetector) -> UBool; +} +unsafe extern "C" { + pub fn ucsdet_enableInputFilter_76(ucsd: *mut UCharsetDetector, filter: UBool) -> UBool; +} +unsafe extern "C" { + pub fn ucsdet_getDetectableCharsets_76( + ucsd: *const UCharsetDetector, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn ucsdet_setDetectableCharset_76( + ucsd: *mut UCharsetDetector, + encoding: *const ::std::os::raw::c_char, + enabled: UBool, + status: *mut UErrorCode, + ); +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UFieldPosition { + pub field: i32, + pub beginIndex: i32, + pub endIndex: i32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UFieldPosition"][::std::mem::size_of::() - 12usize]; + ["Alignment of UFieldPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UFieldPosition::field"] + [::std::mem::offset_of!(UFieldPosition, field) - 0usize]; + ["Offset of field: UFieldPosition::beginIndex"] + [::std::mem::offset_of!(UFieldPosition, beginIndex) - 4usize]; + ["Offset of field: UFieldPosition::endIndex"] + [::std::mem::offset_of!(UFieldPosition, endIndex) - 8usize]; +}; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UFormattableType { + UFMT_DATE = 0, + UFMT_DOUBLE = 1, + UFMT_LONG = 2, + UFMT_STRING = 3, + UFMT_ARRAY = 4, + UFMT_INT64 = 5, + UFMT_OBJECT = 6, + UFMT_COUNT = 7, +} +pub type UFormattable = *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn ufmt_open_76(status: *mut UErrorCode) -> *mut UFormattable; +} +unsafe extern "C" { + pub fn ufmt_close_76(fmt: *mut UFormattable); +} +unsafe extern "C" { + pub fn ufmt_getType_76(fmt: *const UFormattable, status: *mut UErrorCode) -> UFormattableType; +} +unsafe extern "C" { + pub fn ufmt_isNumeric_76(fmt: *const UFormattable) -> UBool; +} +unsafe extern "C" { + pub fn ufmt_getDate_76(fmt: *const UFormattable, status: *mut UErrorCode) -> UDate; +} +unsafe extern "C" { + pub fn ufmt_getDouble_76(fmt: *mut UFormattable, status: *mut UErrorCode) -> f64; +} +unsafe extern "C" { + pub fn ufmt_getLong_76(fmt: *mut UFormattable, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ufmt_getInt64_76(fmt: *mut UFormattable, status: *mut UErrorCode) -> i64; +} +unsafe extern "C" { + pub fn ufmt_getObject_76( + fmt: *const UFormattable, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn ufmt_getUChars_76( + fmt: *mut UFormattable, + len: *mut i32, + status: *mut UErrorCode, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn ufmt_getArrayLength_76(fmt: *const UFormattable, status: *mut UErrorCode) -> i32; +} +unsafe extern "C" { + pub fn ufmt_getArrayItemByIndex_76( + fmt: *mut UFormattable, + n: i32, + status: *mut UErrorCode, + ) -> *mut UFormattable; +} +unsafe extern "C" { + pub fn ufmt_getDecNumChars_76( + fmt: *mut UFormattable, + len: *mut i32, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDisplayContextType { + UDISPCTX_TYPE_DIALECT_HANDLING = 0, + UDISPCTX_TYPE_CAPITALIZATION = 1, + UDISPCTX_TYPE_DISPLAY_LENGTH = 2, + UDISPCTX_TYPE_SUBSTITUTE_HANDLING = 3, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDisplayContext { + UDISPCTX_STANDARD_NAMES = 0, + UDISPCTX_DIALECT_NAMES = 1, + UDISPCTX_CAPITALIZATION_NONE = 256, + UDISPCTX_CAPITALIZATION_FOR_MIDDLE_OF_SENTENCE = 257, + UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE = 258, + UDISPCTX_CAPITALIZATION_FOR_UI_LIST_OR_MENU = 259, + UDISPCTX_CAPITALIZATION_FOR_STANDALONE = 260, + UDISPCTX_LENGTH_FULL = 512, + UDISPCTX_LENGTH_SHORT = 513, + UDISPCTX_SUBSTITUTE = 768, + UDISPCTX_NO_SUBSTITUTE = 769, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UFieldPositionIterator { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn ufieldpositer_open_76(status: *mut UErrorCode) -> *mut UFieldPositionIterator; +} +unsafe extern "C" { + pub fn ufieldpositer_close_76(fpositer: *mut UFieldPositionIterator); +} +unsafe extern "C" { + pub fn ufieldpositer_next_76( + fpositer: *mut UFieldPositionIterator, + beginIndex: *mut i32, + endIndex: *mut i32, + ) -> i32; +} +pub type UNumberFormat = *mut ::std::os::raw::c_void; +impl UNumberFormatStyle { + pub const UNUM_DEFAULT: UNumberFormatStyle = UNumberFormatStyle::UNUM_DECIMAL; +} +impl UNumberFormatStyle { + pub const UNUM_IGNORE: UNumberFormatStyle = UNumberFormatStyle::UNUM_PATTERN_DECIMAL; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNumberFormatStyle { + UNUM_PATTERN_DECIMAL = 0, + UNUM_DECIMAL = 1, + UNUM_CURRENCY = 2, + UNUM_PERCENT = 3, + UNUM_SCIENTIFIC = 4, + UNUM_SPELLOUT = 5, + UNUM_ORDINAL = 6, + UNUM_DURATION = 7, + UNUM_NUMBERING_SYSTEM = 8, + UNUM_PATTERN_RULEBASED = 9, + UNUM_CURRENCY_ISO = 10, + UNUM_CURRENCY_PLURAL = 11, + UNUM_CURRENCY_ACCOUNTING = 12, + UNUM_CASH_CURRENCY = 13, + UNUM_DECIMAL_COMPACT_SHORT = 14, + UNUM_DECIMAL_COMPACT_LONG = 15, + UNUM_CURRENCY_STANDARD = 16, + UNUM_FORMAT_STYLE_COUNT = 17, +} +unsafe extern "C" { + pub fn unum_open_76( + style: UNumberFormatStyle, + pattern: *const UChar, + patternLength: i32, + locale: *const ::std::os::raw::c_char, + parseErr: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UNumberFormat; +} +unsafe extern "C" { + pub fn unum_close_76(fmt: *mut UNumberFormat); +} +unsafe extern "C" { + pub fn unum_clone_76(fmt: *const UNumberFormat, status: *mut UErrorCode) -> *mut UNumberFormat; +} +unsafe extern "C" { + pub fn unum_format_76( + fmt: *const UNumberFormat, + number: i32, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatInt64_76( + fmt: *const UNumberFormat, + number: i64, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatDouble_76( + fmt: *const UNumberFormat, + number: f64, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatDoubleForFields_76( + format: *const UNumberFormat, + number: f64, + result: *mut UChar, + resultLength: i32, + fpositer: *mut UFieldPositionIterator, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatDecimal_76( + fmt: *const UNumberFormat, + number: *const ::std::os::raw::c_char, + length: i32, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatDoubleCurrency_76( + fmt: *const UNumberFormat, + number: f64, + currency: *mut UChar, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_formatUFormattable_76( + fmt: *const UNumberFormat, + number: *const UFormattable, + result: *mut UChar, + resultLength: i32, + pos: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_parse_76( + fmt: *const UNumberFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_parseInt64_76( + fmt: *const UNumberFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ) -> i64; +} +unsafe extern "C" { + pub fn unum_parseDouble_76( + fmt: *const UNumberFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ) -> f64; +} +unsafe extern "C" { + pub fn unum_parseDecimal_76( + fmt: *const UNumberFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + outBuf: *mut ::std::os::raw::c_char, + outBufLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_parseDoubleCurrency_76( + fmt: *const UNumberFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + currency: *mut UChar, + status: *mut UErrorCode, + ) -> f64; +} +unsafe extern "C" { + pub fn unum_parseToUFormattable_76( + fmt: *const UNumberFormat, + result: *mut UFormattable, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ) -> *mut UFormattable; +} +unsafe extern "C" { + pub fn unum_applyPattern_76( + format: *mut UNumberFormat, + localized: UBool, + pattern: *const UChar, + patternLength: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unum_getAvailable_76(localeIndex: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn unum_countAvailable_76() -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNumberFormatAttribute { + UNUM_PARSE_INT_ONLY = 0, + UNUM_GROUPING_USED = 1, + UNUM_DECIMAL_ALWAYS_SHOWN = 2, + UNUM_MAX_INTEGER_DIGITS = 3, + UNUM_MIN_INTEGER_DIGITS = 4, + UNUM_INTEGER_DIGITS = 5, + UNUM_MAX_FRACTION_DIGITS = 6, + UNUM_MIN_FRACTION_DIGITS = 7, + UNUM_FRACTION_DIGITS = 8, + UNUM_MULTIPLIER = 9, + UNUM_GROUPING_SIZE = 10, + UNUM_ROUNDING_MODE = 11, + UNUM_ROUNDING_INCREMENT = 12, + UNUM_FORMAT_WIDTH = 13, + UNUM_PADDING_POSITION = 14, + UNUM_SECONDARY_GROUPING_SIZE = 15, + UNUM_SIGNIFICANT_DIGITS_USED = 16, + UNUM_MIN_SIGNIFICANT_DIGITS = 17, + UNUM_MAX_SIGNIFICANT_DIGITS = 18, + UNUM_LENIENT_PARSE = 19, + UNUM_PARSE_ALL_INPUT = 20, + UNUM_SCALE = 21, + UNUM_MINIMUM_GROUPING_DIGITS = 22, + UNUM_CURRENCY_USAGE = 23, + UNUM_MAX_NONBOOLEAN_ATTRIBUTE = 4095, + UNUM_FORMAT_FAIL_IF_MORE_THAN_MAX_DIGITS = 4096, + UNUM_PARSE_NO_EXPONENT = 4097, + UNUM_PARSE_DECIMAL_MARK_REQUIRED = 4098, + UNUM_PARSE_CASE_SENSITIVE = 4099, + UNUM_SIGN_ALWAYS_SHOWN = 4100, + UNUM_LIMIT_BOOLEAN_ATTRIBUTE = 4101, +} +unsafe extern "C" { + pub fn unum_hasAttribute_76(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> bool; +} +unsafe extern "C" { + pub fn unum_getAttribute_76(fmt: *const UNumberFormat, attr: UNumberFormatAttribute) -> i32; +} +unsafe extern "C" { + pub fn unum_setAttribute_76( + fmt: *mut UNumberFormat, + attr: UNumberFormatAttribute, + newValue: i32, + ); +} +unsafe extern "C" { + pub fn unum_getDoubleAttribute_76( + fmt: *const UNumberFormat, + attr: UNumberFormatAttribute, + ) -> f64; +} +unsafe extern "C" { + pub fn unum_setDoubleAttribute_76( + fmt: *mut UNumberFormat, + attr: UNumberFormatAttribute, + newValue: f64, + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNumberFormatTextAttribute { + UNUM_POSITIVE_PREFIX = 0, + UNUM_POSITIVE_SUFFIX = 1, + UNUM_NEGATIVE_PREFIX = 2, + UNUM_NEGATIVE_SUFFIX = 3, + UNUM_PADDING_CHARACTER = 4, + UNUM_CURRENCY_CODE = 5, + UNUM_DEFAULT_RULESET = 6, + UNUM_PUBLIC_RULESETS = 7, +} +unsafe extern "C" { + pub fn unum_getTextAttribute_76( + fmt: *const UNumberFormat, + tag: UNumberFormatTextAttribute, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_setTextAttribute_76( + fmt: *mut UNumberFormat, + tag: UNumberFormatTextAttribute, + newValue: *const UChar, + newValueLength: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unum_toPattern_76( + fmt: *const UNumberFormat, + isPatternLocalized: UBool, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UNumberFormatSymbol { + UNUM_DECIMAL_SEPARATOR_SYMBOL = 0, + UNUM_GROUPING_SEPARATOR_SYMBOL = 1, + UNUM_PATTERN_SEPARATOR_SYMBOL = 2, + UNUM_PERCENT_SYMBOL = 3, + UNUM_ZERO_DIGIT_SYMBOL = 4, + UNUM_DIGIT_SYMBOL = 5, + UNUM_MINUS_SIGN_SYMBOL = 6, + UNUM_PLUS_SIGN_SYMBOL = 7, + UNUM_CURRENCY_SYMBOL = 8, + UNUM_INTL_CURRENCY_SYMBOL = 9, + UNUM_MONETARY_SEPARATOR_SYMBOL = 10, + UNUM_EXPONENTIAL_SYMBOL = 11, + UNUM_PERMILL_SYMBOL = 12, + UNUM_PAD_ESCAPE_SYMBOL = 13, + UNUM_INFINITY_SYMBOL = 14, + UNUM_NAN_SYMBOL = 15, + UNUM_SIGNIFICANT_DIGIT_SYMBOL = 16, + UNUM_MONETARY_GROUPING_SEPARATOR_SYMBOL = 17, + UNUM_ONE_DIGIT_SYMBOL = 18, + UNUM_TWO_DIGIT_SYMBOL = 19, + UNUM_THREE_DIGIT_SYMBOL = 20, + UNUM_FOUR_DIGIT_SYMBOL = 21, + UNUM_FIVE_DIGIT_SYMBOL = 22, + UNUM_SIX_DIGIT_SYMBOL = 23, + UNUM_SEVEN_DIGIT_SYMBOL = 24, + UNUM_EIGHT_DIGIT_SYMBOL = 25, + UNUM_NINE_DIGIT_SYMBOL = 26, + UNUM_EXPONENT_MULTIPLICATION_SYMBOL = 27, + UNUM_APPROXIMATELY_SIGN_SYMBOL = 28, + UNUM_FORMAT_SYMBOL_COUNT = 29, +} +unsafe extern "C" { + pub fn unum_getSymbol_76( + fmt: *const UNumberFormat, + symbol: UNumberFormatSymbol, + buffer: *mut UChar, + size: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unum_setSymbol_76( + fmt: *mut UNumberFormat, + symbol: UNumberFormatSymbol, + value: *const UChar, + length: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unum_getLocaleByType_76( + fmt: *const UNumberFormat, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn unum_setContext_76( + fmt: *mut UNumberFormat, + value: UDisplayContext, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unum_getContext_76( + fmt: *const UNumberFormat, + type_: UDisplayContextType, + status: *mut UErrorCode, + ) -> UDisplayContext; +} +pub type UDateFormat = *mut ::std::os::raw::c_void; +impl UDateFormatStyle { + pub const UDAT_DEFAULT: UDateFormatStyle = UDateFormatStyle::UDAT_MEDIUM; +} +impl UDateFormatStyle { + pub const UDAT_FULL_RELATIVE: UDateFormatStyle = UDateFormatStyle::UDAT_RELATIVE; +} +impl UDateFormatStyle { + pub const UDAT_IGNORE: UDateFormatStyle = UDateFormatStyle::UDAT_PATTERN; +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateFormatStyle { + UDAT_FULL = 0, + UDAT_LONG = 1, + UDAT_MEDIUM = 2, + UDAT_SHORT = 3, + UDAT_RELATIVE = 128, + UDAT_LONG_RELATIVE = 129, + UDAT_MEDIUM_RELATIVE = 130, + UDAT_SHORT_RELATIVE = 131, + UDAT_NONE = -1, + UDAT_PATTERN = -2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateFormatField { + UDAT_ERA_FIELD = 0, + UDAT_YEAR_FIELD = 1, + UDAT_MONTH_FIELD = 2, + UDAT_DATE_FIELD = 3, + UDAT_HOUR_OF_DAY1_FIELD = 4, + UDAT_HOUR_OF_DAY0_FIELD = 5, + UDAT_MINUTE_FIELD = 6, + UDAT_SECOND_FIELD = 7, + UDAT_FRACTIONAL_SECOND_FIELD = 8, + UDAT_DAY_OF_WEEK_FIELD = 9, + UDAT_DAY_OF_YEAR_FIELD = 10, + UDAT_DAY_OF_WEEK_IN_MONTH_FIELD = 11, + UDAT_WEEK_OF_YEAR_FIELD = 12, + UDAT_WEEK_OF_MONTH_FIELD = 13, + UDAT_AM_PM_FIELD = 14, + UDAT_HOUR1_FIELD = 15, + UDAT_HOUR0_FIELD = 16, + UDAT_TIMEZONE_FIELD = 17, + UDAT_YEAR_WOY_FIELD = 18, + UDAT_DOW_LOCAL_FIELD = 19, + UDAT_EXTENDED_YEAR_FIELD = 20, + UDAT_JULIAN_DAY_FIELD = 21, + UDAT_MILLISECONDS_IN_DAY_FIELD = 22, + UDAT_TIMEZONE_RFC_FIELD = 23, + UDAT_TIMEZONE_GENERIC_FIELD = 24, + UDAT_STANDALONE_DAY_FIELD = 25, + UDAT_STANDALONE_MONTH_FIELD = 26, + UDAT_QUARTER_FIELD = 27, + UDAT_STANDALONE_QUARTER_FIELD = 28, + UDAT_TIMEZONE_SPECIAL_FIELD = 29, + UDAT_YEAR_NAME_FIELD = 30, + UDAT_TIMEZONE_LOCALIZED_GMT_OFFSET_FIELD = 31, + UDAT_TIMEZONE_ISO_FIELD = 32, + UDAT_TIMEZONE_ISO_LOCAL_FIELD = 33, + UDAT_RELATED_YEAR_FIELD = 34, + UDAT_AM_PM_MIDNIGHT_NOON_FIELD = 35, + UDAT_FLEXIBLE_DAY_PERIOD_FIELD = 36, + UDAT_TIME_SEPARATOR_FIELD = 37, + UDAT_FIELD_COUNT = 38, +} +unsafe extern "C" { + pub fn udat_toCalendarDateField_76(field: UDateFormatField) -> UCalendarDateFields; +} +unsafe extern "C" { + pub fn udat_open_76( + timeStyle: UDateFormatStyle, + dateStyle: UDateFormatStyle, + locale: *const ::std::os::raw::c_char, + tzID: *const UChar, + tzIDLength: i32, + pattern: *const UChar, + patternLength: i32, + status: *mut UErrorCode, + ) -> *mut UDateFormat; +} +unsafe extern "C" { + pub fn udat_close_76(format: *mut UDateFormat); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateFormatBooleanAttribute { + UDAT_PARSE_ALLOW_WHITESPACE = 0, + UDAT_PARSE_ALLOW_NUMERIC = 1, + UDAT_PARSE_PARTIAL_LITERAL_MATCH = 2, + UDAT_PARSE_MULTIPLE_PATTERNS_FOR_MATCH = 3, + UDAT_BOOLEAN_ATTRIBUTE_COUNT = 4, +} +unsafe extern "C" { + pub fn udat_getBooleanAttribute_76( + fmt: *const UDateFormat, + attr: UDateFormatBooleanAttribute, + status: *mut UErrorCode, + ) -> UBool; +} +unsafe extern "C" { + pub fn udat_setBooleanAttribute_76( + fmt: *mut UDateFormat, + attr: UDateFormatBooleanAttribute, + newValue: UBool, + status: *mut UErrorCode, + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateFormatHourCycle { + UDAT_HOUR_CYCLE_11 = 0, + UDAT_HOUR_CYCLE_12 = 1, + UDAT_HOUR_CYCLE_23 = 2, + UDAT_HOUR_CYCLE_24 = 3, +} +unsafe extern "C" { + pub fn udat_clone_76(fmt: *const UDateFormat, status: *mut UErrorCode) -> *mut UDateFormat; +} +unsafe extern "C" { + pub fn udat_format_76( + format: *const UDateFormat, + dateToFormat: UDate, + result: *mut UChar, + resultLength: i32, + position: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_formatCalendar_76( + format: *const UDateFormat, + calendar: *mut UCalendar, + result: *mut UChar, + capacity: i32, + position: *mut UFieldPosition, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_formatForFields_76( + format: *const UDateFormat, + dateToFormat: UDate, + result: *mut UChar, + resultLength: i32, + fpositer: *mut UFieldPositionIterator, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_formatCalendarForFields_76( + format: *const UDateFormat, + calendar: *mut UCalendar, + result: *mut UChar, + capacity: i32, + fpositer: *mut UFieldPositionIterator, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_parse_76( + format: *const UDateFormat, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ) -> UDate; +} +unsafe extern "C" { + pub fn udat_parseCalendar_76( + format: *const UDateFormat, + calendar: *mut UCalendar, + text: *const UChar, + textLength: i32, + parsePos: *mut i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn udat_isLenient_76(fmt: *const UDateFormat) -> UBool; +} +unsafe extern "C" { + pub fn udat_setLenient_76(fmt: *mut UDateFormat, isLenient: UBool); +} +unsafe extern "C" { + pub fn udat_getCalendar_76(fmt: *const UDateFormat) -> *const UCalendar; +} +unsafe extern "C" { + pub fn udat_setCalendar_76(fmt: *mut UDateFormat, calendarToSet: *const UCalendar); +} +unsafe extern "C" { + pub fn udat_getNumberFormat_76(fmt: *const UDateFormat) -> *const UNumberFormat; +} +unsafe extern "C" { + pub fn udat_getNumberFormatForField_76( + fmt: *const UDateFormat, + field: UChar, + ) -> *const UNumberFormat; +} +unsafe extern "C" { + pub fn udat_adoptNumberFormatForFields_76( + fmt: *mut UDateFormat, + fields: *const UChar, + numberFormatToSet: *mut UNumberFormat, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn udat_setNumberFormat_76(fmt: *mut UDateFormat, numberFormatToSet: *const UNumberFormat); +} +unsafe extern "C" { + pub fn udat_adoptNumberFormat_76( + fmt: *mut UDateFormat, + numberFormatToAdopt: *mut UNumberFormat, + ); +} +unsafe extern "C" { + pub fn udat_getAvailable_76(localeIndex: i32) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn udat_countAvailable_76() -> i32; +} +unsafe extern "C" { + pub fn udat_get2DigitYearStart_76(fmt: *const UDateFormat, status: *mut UErrorCode) -> UDate; +} +unsafe extern "C" { + pub fn udat_set2DigitYearStart_76(fmt: *mut UDateFormat, d: UDate, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn udat_toPattern_76( + fmt: *const UDateFormat, + localized: UBool, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_applyPattern_76( + format: *mut UDateFormat, + localized: UBool, + pattern: *const UChar, + patternLength: i32, + ); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateFormatSymbolType { + UDAT_ERAS = 0, + UDAT_MONTHS = 1, + UDAT_SHORT_MONTHS = 2, + UDAT_WEEKDAYS = 3, + UDAT_SHORT_WEEKDAYS = 4, + UDAT_AM_PMS = 5, + UDAT_LOCALIZED_CHARS = 6, + UDAT_ERA_NAMES = 7, + UDAT_NARROW_MONTHS = 8, + UDAT_NARROW_WEEKDAYS = 9, + UDAT_STANDALONE_MONTHS = 10, + UDAT_STANDALONE_SHORT_MONTHS = 11, + UDAT_STANDALONE_NARROW_MONTHS = 12, + UDAT_STANDALONE_WEEKDAYS = 13, + UDAT_STANDALONE_SHORT_WEEKDAYS = 14, + UDAT_STANDALONE_NARROW_WEEKDAYS = 15, + UDAT_QUARTERS = 16, + UDAT_SHORT_QUARTERS = 17, + UDAT_STANDALONE_QUARTERS = 18, + UDAT_STANDALONE_SHORT_QUARTERS = 19, + UDAT_SHORTER_WEEKDAYS = 20, + UDAT_STANDALONE_SHORTER_WEEKDAYS = 21, + UDAT_CYCLIC_YEARS_WIDE = 22, + UDAT_CYCLIC_YEARS_ABBREVIATED = 23, + UDAT_CYCLIC_YEARS_NARROW = 24, + UDAT_ZODIAC_NAMES_WIDE = 25, + UDAT_ZODIAC_NAMES_ABBREVIATED = 26, + UDAT_ZODIAC_NAMES_NARROW = 27, + UDAT_NARROW_QUARTERS = 28, + UDAT_STANDALONE_NARROW_QUARTERS = 29, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UDateFormatSymbols { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn udat_getSymbols_76( + fmt: *const UDateFormat, + type_: UDateFormatSymbolType, + symbolIndex: i32, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_countSymbols_76(fmt: *const UDateFormat, type_: UDateFormatSymbolType) -> i32; +} +unsafe extern "C" { + pub fn udat_setSymbols_76( + format: *mut UDateFormat, + type_: UDateFormatSymbolType, + symbolIndex: i32, + value: *mut UChar, + valueLength: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn udat_getLocaleByType_76( + fmt: *const UDateFormat, + type_: ULocDataLocaleType, + status: *mut UErrorCode, + ) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn udat_setContext_76( + fmt: *mut UDateFormat, + value: UDisplayContext, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn udat_getContext_76( + fmt: *const UDateFormat, + type_: UDisplayContextType, + status: *mut UErrorCode, + ) -> UDisplayContext; +} +unsafe extern "C" { + pub fn udat_toPatternRelativeDate_76( + fmt: *const UDateFormat, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_toPatternRelativeTime_76( + fmt: *const UDateFormat, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udat_applyPatternRelative_76( + format: *mut UDateFormat, + datePattern: *const UChar, + datePatternLength: i32, + timePattern: *const UChar, + timePatternLength: i32, + status: *mut UErrorCode, + ); +} +pub type UDateFormatOpener = ::std::option::Option< + unsafe extern "C" fn( + timeStyle: UDateFormatStyle, + dateStyle: UDateFormatStyle, + locale: *const ::std::os::raw::c_char, + tzID: *const UChar, + tzIDLength: i32, + pattern: *const UChar, + patternLength: i32, + status: *mut UErrorCode, + ) -> *mut UDateFormat, +>; +unsafe extern "C" { + pub fn udat_registerOpener_76(opener: UDateFormatOpener, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn udat_unregisterOpener_76( + opener: UDateFormatOpener, + status: *mut UErrorCode, + ) -> UDateFormatOpener; +} +pub type UDateTimePatternGenerator = *mut ::std::os::raw::c_void; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateTimePatternField { + UDATPG_ERA_FIELD = 0, + UDATPG_YEAR_FIELD = 1, + UDATPG_QUARTER_FIELD = 2, + UDATPG_MONTH_FIELD = 3, + UDATPG_WEEK_OF_YEAR_FIELD = 4, + UDATPG_WEEK_OF_MONTH_FIELD = 5, + UDATPG_WEEKDAY_FIELD = 6, + UDATPG_DAY_OF_YEAR_FIELD = 7, + UDATPG_DAY_OF_WEEK_IN_MONTH_FIELD = 8, + UDATPG_DAY_FIELD = 9, + UDATPG_DAYPERIOD_FIELD = 10, + UDATPG_HOUR_FIELD = 11, + UDATPG_MINUTE_FIELD = 12, + UDATPG_SECOND_FIELD = 13, + UDATPG_FRACTIONAL_SECOND_FIELD = 14, + UDATPG_ZONE_FIELD = 15, + UDATPG_FIELD_COUNT = 16, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateTimePGDisplayWidth { + UDATPG_WIDE = 0, + UDATPG_ABBREVIATED = 1, + UDATPG_NARROW = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateTimePatternMatchOptions { + UDATPG_MATCH_NO_OPTIONS = 0, + UDATPG_MATCH_HOUR_FIELD_LENGTH = 2048, + UDATPG_MATCH_MINUTE_FIELD_LENGTH = 4096, + UDATPG_MATCH_SECOND_FIELD_LENGTH = 8192, + UDATPG_MATCH_ALL_FIELDS_LENGTH = 65535, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDateTimePatternConflict { + UDATPG_NO_CONFLICT = 0, + UDATPG_BASE_CONFLICT = 1, + UDATPG_CONFLICT = 2, + UDATPG_CONFLICT_COUNT = 3, +} +unsafe extern "C" { + pub fn udatpg_open_76( + locale: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> *mut UDateTimePatternGenerator; +} +unsafe extern "C" { + pub fn udatpg_openEmpty_76(pErrorCode: *mut UErrorCode) -> *mut UDateTimePatternGenerator; +} +unsafe extern "C" { + pub fn udatpg_close_76(dtpg: *mut UDateTimePatternGenerator); +} +unsafe extern "C" { + pub fn udatpg_clone_76( + dtpg: *const UDateTimePatternGenerator, + pErrorCode: *mut UErrorCode, + ) -> *mut UDateTimePatternGenerator; +} +unsafe extern "C" { + pub fn udatpg_getBestPattern_76( + dtpg: *mut UDateTimePatternGenerator, + skeleton: *const UChar, + length: i32, + bestPattern: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_getBestPatternWithOptions_76( + dtpg: *mut UDateTimePatternGenerator, + skeleton: *const UChar, + length: i32, + options: UDateTimePatternMatchOptions, + bestPattern: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_getSkeleton_76( + unusedDtpg: *mut UDateTimePatternGenerator, + pattern: *const UChar, + length: i32, + skeleton: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_getBaseSkeleton_76( + unusedDtpg: *mut UDateTimePatternGenerator, + pattern: *const UChar, + length: i32, + baseSkeleton: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_addPattern_76( + dtpg: *mut UDateTimePatternGenerator, + pattern: *const UChar, + patternLength: i32, + override_: UBool, + conflictingPattern: *mut UChar, + capacity: i32, + pLength: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> UDateTimePatternConflict; +} +unsafe extern "C" { + pub fn udatpg_setAppendItemFormat_76( + dtpg: *mut UDateTimePatternGenerator, + field: UDateTimePatternField, + value: *const UChar, + length: i32, + ); +} +unsafe extern "C" { + pub fn udatpg_getAppendItemFormat_76( + dtpg: *const UDateTimePatternGenerator, + field: UDateTimePatternField, + pLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_setAppendItemName_76( + dtpg: *mut UDateTimePatternGenerator, + field: UDateTimePatternField, + value: *const UChar, + length: i32, + ); +} +unsafe extern "C" { + pub fn udatpg_getAppendItemName_76( + dtpg: *const UDateTimePatternGenerator, + field: UDateTimePatternField, + pLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_getFieldDisplayName_76( + dtpg: *const UDateTimePatternGenerator, + field: UDateTimePatternField, + width: UDateTimePGDisplayWidth, + fieldName: *mut UChar, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_setDateTimeFormat_76( + dtpg: *const UDateTimePatternGenerator, + dtFormat: *const UChar, + length: i32, + ); +} +unsafe extern "C" { + pub fn udatpg_getDateTimeFormat_76( + dtpg: *const UDateTimePatternGenerator, + pLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_setDateTimeFormatForStyle_76( + udtpg: *mut UDateTimePatternGenerator, + style: UDateFormatStyle, + dateTimeFormat: *const UChar, + length: i32, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn udatpg_getDateTimeFormatForStyle_76( + udtpg: *const UDateTimePatternGenerator, + style: UDateFormatStyle, + pLength: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_setDecimal_76( + dtpg: *mut UDateTimePatternGenerator, + decimal: *const UChar, + length: i32, + ); +} +unsafe extern "C" { + pub fn udatpg_getDecimal_76( + dtpg: *const UDateTimePatternGenerator, + pLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_replaceFieldTypes_76( + dtpg: *mut UDateTimePatternGenerator, + pattern: *const UChar, + patternLength: i32, + skeleton: *const UChar, + skeletonLength: i32, + dest: *mut UChar, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_replaceFieldTypesWithOptions_76( + dtpg: *mut UDateTimePatternGenerator, + pattern: *const UChar, + patternLength: i32, + skeleton: *const UChar, + skeletonLength: i32, + options: UDateTimePatternMatchOptions, + dest: *mut UChar, + destCapacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn udatpg_openSkeletons_76( + dtpg: *const UDateTimePatternGenerator, + pErrorCode: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn udatpg_openBaseSkeletons_76( + dtpg: *const UDateTimePatternGenerator, + pErrorCode: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn udatpg_getPatternForSkeleton_76( + dtpg: *const UDateTimePatternGenerator, + skeleton: *const UChar, + skeletonLength: i32, + pLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn udatpg_getDefaultHourCycle_76( + dtpg: *const UDateTimePatternGenerator, + pErrorCode: *mut UErrorCode, + ) -> UDateFormatHourCycle; +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UDataInfo { + pub size: u16, + pub reservedWord: u16, + pub isBigEndian: u8, + pub charsetFamily: u8, + pub sizeofUChar: u8, + pub reservedByte: u8, + pub dataFormat: [u8; 4usize], + pub formatVersion: [u8; 4usize], + pub dataVersion: [u8; 4usize], +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UDataInfo"][::std::mem::size_of::() - 20usize]; + ["Alignment of UDataInfo"][::std::mem::align_of::() - 2usize]; + ["Offset of field: UDataInfo::size"][::std::mem::offset_of!(UDataInfo, size) - 0usize]; + ["Offset of field: UDataInfo::reservedWord"] + [::std::mem::offset_of!(UDataInfo, reservedWord) - 2usize]; + ["Offset of field: UDataInfo::isBigEndian"] + [::std::mem::offset_of!(UDataInfo, isBigEndian) - 4usize]; + ["Offset of field: UDataInfo::charsetFamily"] + [::std::mem::offset_of!(UDataInfo, charsetFamily) - 5usize]; + ["Offset of field: UDataInfo::sizeofUChar"] + [::std::mem::offset_of!(UDataInfo, sizeofUChar) - 6usize]; + ["Offset of field: UDataInfo::reservedByte"] + [::std::mem::offset_of!(UDataInfo, reservedByte) - 7usize]; + ["Offset of field: UDataInfo::dataFormat"] + [::std::mem::offset_of!(UDataInfo, dataFormat) - 8usize]; + ["Offset of field: UDataInfo::formatVersion"] + [::std::mem::offset_of!(UDataInfo, formatVersion) - 12usize]; + ["Offset of field: UDataInfo::dataVersion"] + [::std::mem::offset_of!(UDataInfo, dataVersion) - 16usize]; +}; +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UDataMemory { + _unused: [u8; 0], +} +pub type UDataMemoryIsAcceptable = ::std::option::Option< + unsafe extern "C" fn( + context: *mut ::std::os::raw::c_void, + type_: *const ::std::os::raw::c_char, + name: *const ::std::os::raw::c_char, + pInfo: *const UDataInfo, + ) -> UBool, +>; +unsafe extern "C" { + pub fn udata_open_76( + path: *const ::std::os::raw::c_char, + type_: *const ::std::os::raw::c_char, + name: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> *mut UDataMemory; +} +unsafe extern "C" { + pub fn udata_openChoice_76( + path: *const ::std::os::raw::c_char, + type_: *const ::std::os::raw::c_char, + name: *const ::std::os::raw::c_char, + isAcceptable: UDataMemoryIsAcceptable, + context: *mut ::std::os::raw::c_void, + pErrorCode: *mut UErrorCode, + ) -> *mut UDataMemory; +} +unsafe extern "C" { + pub fn udata_close_76(pData: *mut UDataMemory); +} +unsafe extern "C" { + pub fn udata_getMemory_76(pData: *mut UDataMemory) -> *const ::std::os::raw::c_void; +} +unsafe extern "C" { + pub fn udata_getInfo_76(pData: *mut UDataMemory, pInfo: *mut UDataInfo); +} +unsafe extern "C" { + pub fn udata_setCommonData_76(data: *const ::std::os::raw::c_void, err: *mut UErrorCode); +} +unsafe extern "C" { + pub fn udata_setAppData_76( + packageName: *const ::std::os::raw::c_char, + data: *const ::std::os::raw::c_void, + err: *mut UErrorCode, + ); +} +impl UDataFileAccess { + pub const UDATA_DEFAULT_ACCESS: UDataFileAccess = UDataFileAccess::UDATA_FILES_FIRST; +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UDataFileAccess { + UDATA_FILES_FIRST = 0, + UDATA_ONLY_PACKAGES = 1, + UDATA_PACKAGES_FIRST = 2, + UDATA_NO_FILES = 3, + UDATA_FILE_ACCESS_COUNT = 4, +} +unsafe extern "C" { + pub fn udata_setFileAccess_76(access: UDataFileAccess, status: *mut UErrorCode); +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UFieldCategory { + UFIELD_CATEGORY_UNDEFINED = 0, + UFIELD_CATEGORY_DATE = 1, + UFIELD_CATEGORY_NUMBER = 2, + UFIELD_CATEGORY_LIST = 3, + UFIELD_CATEGORY_RELATIVE_DATETIME = 4, + UFIELD_CATEGORY_DATE_INTERVAL = 5, + UFIELD_CATEGORY_COUNT = 6, + UFIELD_CATEGORY_LIST_SPAN = 4099, + UFIELD_CATEGORY_DATE_INTERVAL_SPAN = 4101, + UFIELD_CATEGORY_NUMBER_RANGE_SPAN = 4098, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UFormattedValue { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UListFormatter { + _unused: [u8; 0], +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UFormattedList { + _unused: [u8; 0], +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UListFormatterField { + ULISTFMT_LITERAL_FIELD = 0, + ULISTFMT_ELEMENT_FIELD = 1, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UListFormatterType { + ULISTFMT_TYPE_AND = 0, + ULISTFMT_TYPE_OR = 1, + ULISTFMT_TYPE_UNITS = 2, +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UListFormatterWidth { + ULISTFMT_WIDTH_WIDE = 0, + ULISTFMT_WIDTH_SHORT = 1, + ULISTFMT_WIDTH_NARROW = 2, +} +unsafe extern "C" { + pub fn ulistfmt_open_76( + locale: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> *mut UListFormatter; +} +unsafe extern "C" { + pub fn ulistfmt_openForType_76( + locale: *const ::std::os::raw::c_char, + type_: UListFormatterType, + width: UListFormatterWidth, + status: *mut UErrorCode, + ) -> *mut UListFormatter; +} +unsafe extern "C" { + pub fn ulistfmt_close_76(listfmt: *mut UListFormatter); +} +unsafe extern "C" { + pub fn ulistfmt_openResult_76(ec: *mut UErrorCode) -> *mut UFormattedList; +} +unsafe extern "C" { + pub fn ulistfmt_resultAsValue_76( + uresult: *const UFormattedList, + ec: *mut UErrorCode, + ) -> *const UFormattedValue; +} +unsafe extern "C" { + pub fn ulistfmt_closeResult_76(uresult: *mut UFormattedList); +} +unsafe extern "C" { + pub fn ulistfmt_format_76( + listfmt: *const UListFormatter, + strings: *const *const UChar, + stringLengths: *const i32, + stringCount: i32, + result: *mut UChar, + resultCapacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ulistfmt_formatStringsToResult_76( + listfmt: *const UListFormatter, + strings: *const *const UChar, + stringLengths: *const i32, + stringCount: i32, + uresult: *mut UFormattedList, + status: *mut UErrorCode, + ); +} +pub type va_list = __builtin_va_list; +unsafe extern "C" { + pub fn u_formatMessage_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ... + ) -> i32; +} +unsafe extern "C" { + pub fn u_vformatMessage_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + result: *mut UChar, + resultLength: i32, + ap: *mut __va_list_tag, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_parseMessage_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + source: *const UChar, + sourceLength: i32, + status: *mut UErrorCode, + ... + ); +} +unsafe extern "C" { + pub fn u_vparseMessage_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + source: *const UChar, + sourceLength: i32, + ap: *mut __va_list_tag, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn u_formatMessageWithError_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + result: *mut UChar, + resultLength: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ... + ) -> i32; +} +unsafe extern "C" { + pub fn u_vformatMessageWithError_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + result: *mut UChar, + resultLength: i32, + parseError: *mut UParseError, + ap: *mut __va_list_tag, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_parseMessageWithError_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + source: *const UChar, + sourceLength: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ... + ); +} +unsafe extern "C" { + pub fn u_vparseMessageWithError_76( + locale: *const ::std::os::raw::c_char, + pattern: *const UChar, + patternLength: i32, + source: *const UChar, + sourceLength: i32, + ap: *mut __va_list_tag, + parseError: *mut UParseError, + status: *mut UErrorCode, + ); +} +pub type UMessageFormat = *mut ::std::os::raw::c_void; +unsafe extern "C" { + pub fn umsg_open_76( + pattern: *const UChar, + patternLength: i32, + locale: *const ::std::os::raw::c_char, + parseError: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UMessageFormat; +} +unsafe extern "C" { + pub fn umsg_close_76(format: *mut UMessageFormat); +} +unsafe extern "C" { + pub fn umsg_clone_76(fmt: *const UMessageFormat, status: *mut UErrorCode) -> UMessageFormat; +} +unsafe extern "C" { + pub fn umsg_setLocale_76(fmt: *mut UMessageFormat, locale: *const ::std::os::raw::c_char); +} +unsafe extern "C" { + pub fn umsg_getLocale_76(fmt: *const UMessageFormat) -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn umsg_applyPattern_76( + fmt: *mut UMessageFormat, + pattern: *const UChar, + patternLength: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn umsg_toPattern_76( + fmt: *const UMessageFormat, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn umsg_format_76( + fmt: *const UMessageFormat, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ... + ) -> i32; +} +unsafe extern "C" { + pub fn umsg_vformat_76( + fmt: *const UMessageFormat, + result: *mut UChar, + resultLength: i32, + ap: *mut __va_list_tag, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn umsg_parse_76( + fmt: *const UMessageFormat, + source: *const UChar, + sourceLength: i32, + count: *mut i32, + status: *mut UErrorCode, + ... + ); +} +unsafe extern "C" { + pub fn umsg_vparse_76( + fmt: *const UMessageFormat, + source: *const UChar, + sourceLength: i32, + count: *mut i32, + ap: *mut __va_list_tag, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn umsg_autoQuoteApostrophe_76( + pattern: *const UChar, + patternLength: i32, + dest: *mut UChar, + destCapacity: i32, + ec: *mut UErrorCode, + ) -> i32; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UFormattedNumber { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn unumf_openResult_76(ec: *mut UErrorCode) -> *mut UFormattedNumber; +} +unsafe extern "C" { + pub fn unumf_resultAsValue_76( + uresult: *const UFormattedNumber, + ec: *mut UErrorCode, + ) -> *const UFormattedValue; +} +unsafe extern "C" { + pub fn unumf_resultToString_76( + uresult: *const UFormattedNumber, + buffer: *mut UChar, + bufferCapacity: i32, + ec: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unumf_resultNextFieldPosition_76( + uresult: *const UFormattedNumber, + ufpos: *mut UFieldPosition, + ec: *mut UErrorCode, + ) -> UBool; +} +unsafe extern "C" { + pub fn unumf_resultGetAllFieldPositions_76( + uresult: *const UFormattedNumber, + ufpositer: *mut UFieldPositionIterator, + ec: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unumf_resultToDecimalNumber_76( + uresult: *const UFormattedNumber, + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + ec: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn unumf_closeResult_76(uresult: *mut UFormattedNumber); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UNumberFormatter { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn unumf_openForSkeletonAndLocale_76( + skeleton: *const UChar, + skeletonLen: i32, + locale: *const ::std::os::raw::c_char, + ec: *mut UErrorCode, + ) -> *mut UNumberFormatter; +} +unsafe extern "C" { + pub fn unumf_openForSkeletonAndLocaleWithError_76( + skeleton: *const UChar, + skeletonLen: i32, + locale: *const ::std::os::raw::c_char, + perror: *mut UParseError, + ec: *mut UErrorCode, + ) -> *mut UNumberFormatter; +} +unsafe extern "C" { + pub fn unumf_formatInt_76( + uformatter: *const UNumberFormatter, + value: i64, + uresult: *mut UFormattedNumber, + ec: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unumf_formatDouble_76( + uformatter: *const UNumberFormatter, + value: f64, + uresult: *mut UFormattedNumber, + ec: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unumf_formatDecimal_76( + uformatter: *const UNumberFormatter, + value: *const ::std::os::raw::c_char, + valueLen: i32, + uresult: *mut UFormattedNumber, + ec: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn unumf_close_76(uformatter: *mut UNumberFormatter); +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UFormattedNumberRange { + _unused: [u8; 0], +} +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UPluralType { + UPLURAL_TYPE_CARDINAL = 0, + UPLURAL_TYPE_ORDINAL = 1, + UPLURAL_TYPE_COUNT = 2, +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UPluralRules { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn uplrules_open_76( + locale: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ) -> *mut UPluralRules; +} +unsafe extern "C" { + pub fn uplrules_openForType_76( + locale: *const ::std::os::raw::c_char, + type_: UPluralType, + status: *mut UErrorCode, + ) -> *mut UPluralRules; +} +unsafe extern "C" { + pub fn uplrules_close_76(uplrules: *mut UPluralRules); +} +unsafe extern "C" { + pub fn uplrules_select_76( + uplrules: *const UPluralRules, + number: f64, + keyword: *mut UChar, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uplrules_selectFormatted_76( + uplrules: *const UPluralRules, + number: *const UFormattedNumber, + keyword: *mut UChar, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uplrules_selectForRange_76( + uplrules: *const UPluralRules, + urange: *const UFormattedNumberRange, + keyword: *mut UChar, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uplrules_selectWithFormat_76( + uplrules: *const UPluralRules, + number: f64, + fmt: *const UNumberFormat, + keyword: *mut UChar, + capacity: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn uplrules_getKeywords_76( + uplrules: *const UPluralRules, + status: *mut UErrorCode, + ) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn u_getDataDirectory_76() -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_setDataDirectory_76(directory: *const ::std::os::raw::c_char); +} +unsafe extern "C" { + pub fn u_getTimeZoneFilesDirectory_76(status: *mut UErrorCode) + -> *const ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_setTimeZoneFilesDirectory_76( + path: *const ::std::os::raw::c_char, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn u_charsToUChars_76(cs: *const ::std::os::raw::c_char, us: *mut UChar, length: i32); +} +unsafe extern "C" { + pub fn u_UCharsToChars_76(us: *const UChar, cs: *mut ::std::os::raw::c_char, length: i32); +} +unsafe extern "C" { + pub fn u_strlen_76(s: *const UChar) -> i32; +} +unsafe extern "C" { + pub fn u_countChar32_76(s: *const UChar, length: i32) -> i32; +} +unsafe extern "C" { + pub fn u_strHasMoreChar32Than_76(s: *const UChar, length: i32, number: i32) -> UBool; +} +unsafe extern "C" { + pub fn u_strcat_76(dst: *mut UChar, src: *const UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strncat_76(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strstr_76(s: *const UChar, substring: *const UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strFindFirst_76( + s: *const UChar, + length: i32, + substring: *const UChar, + subLength: i32, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strchr_76(s: *const UChar, c: UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strchr32_76(s: *const UChar, c: UChar32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strrstr_76(s: *const UChar, substring: *const UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strFindLast_76( + s: *const UChar, + length: i32, + substring: *const UChar, + subLength: i32, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strrchr_76(s: *const UChar, c: UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strrchr32_76(s: *const UChar, c: UChar32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strpbrk_76(string: *const UChar, matchSet: *const UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strcspn_76(string: *const UChar, matchSet: *const UChar) -> i32; +} +unsafe extern "C" { + pub fn u_strspn_76(string: *const UChar, matchSet: *const UChar) -> i32; +} +unsafe extern "C" { + pub fn u_strtok_r_76( + src: *mut UChar, + delim: *const UChar, + saveState: *mut *mut UChar, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strcmp_76(s1: *const UChar, s2: *const UChar) -> i32; +} +unsafe extern "C" { + pub fn u_strcmpCodePointOrder_76(s1: *const UChar, s2: *const UChar) -> i32; +} +unsafe extern "C" { + pub fn u_strCompare_76( + s1: *const UChar, + length1: i32, + s2: *const UChar, + length2: i32, + codePointOrder: UBool, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strCompareIter_76( + iter1: *mut UCharIterator, + iter2: *mut UCharIterator, + codePointOrder: UBool, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strCaseCompare_76( + s1: *const UChar, + length1: i32, + s2: *const UChar, + length2: i32, + options: u32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strncmp_76(ucs1: *const UChar, ucs2: *const UChar, n: i32) -> i32; +} +unsafe extern "C" { + pub fn u_strncmpCodePointOrder_76(s1: *const UChar, s2: *const UChar, n: i32) -> i32; +} +unsafe extern "C" { + pub fn u_strcasecmp_76(s1: *const UChar, s2: *const UChar, options: u32) -> i32; +} +unsafe extern "C" { + pub fn u_strncasecmp_76(s1: *const UChar, s2: *const UChar, n: i32, options: u32) -> i32; +} +unsafe extern "C" { + pub fn u_memcasecmp_76(s1: *const UChar, s2: *const UChar, length: i32, options: u32) -> i32; +} +unsafe extern "C" { + pub fn u_strcpy_76(dst: *mut UChar, src: *const UChar) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strncpy_76(dst: *mut UChar, src: *const UChar, n: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_uastrcpy_76(dst: *mut UChar, src: *const ::std::os::raw::c_char) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_uastrncpy_76( + dst: *mut UChar, + src: *const ::std::os::raw::c_char, + n: i32, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_austrcpy_76( + dst: *mut ::std::os::raw::c_char, + src: *const UChar, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_austrncpy_76( + dst: *mut ::std::os::raw::c_char, + src: *const UChar, + n: i32, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_memcpy_76(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memmove_76(dest: *mut UChar, src: *const UChar, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memset_76(dest: *mut UChar, c: UChar, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memcmp_76(buf1: *const UChar, buf2: *const UChar, count: i32) -> i32; +} +unsafe extern "C" { + pub fn u_memcmpCodePointOrder_76(s1: *const UChar, s2: *const UChar, count: i32) -> i32; +} +unsafe extern "C" { + pub fn u_memchr_76(s: *const UChar, c: UChar, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memchr32_76(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memrchr_76(s: *const UChar, c: UChar, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_memrchr32_76(s: *const UChar, c: UChar32, count: i32) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_unescape_76( + src: *const ::std::os::raw::c_char, + dest: *mut UChar, + destCapacity: i32, + ) -> i32; +} +pub type UNESCAPE_CHAR_AT = ::std::option::Option< + unsafe extern "C" fn(offset: i32, context: *mut ::std::os::raw::c_void) -> UChar, +>; +unsafe extern "C" { + pub fn u_unescapeAt_76( + charAt: UNESCAPE_CHAR_AT, + offset: *mut i32, + length: i32, + context: *mut ::std::os::raw::c_void, + ) -> UChar32; +} +unsafe extern "C" { + pub fn u_strToUpper_76( + dest: *mut UChar, + destCapacity: i32, + src: *const UChar, + srcLength: i32, + locale: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strToLower_76( + dest: *mut UChar, + destCapacity: i32, + src: *const UChar, + srcLength: i32, + locale: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strToTitle_76( + dest: *mut UChar, + destCapacity: i32, + src: *const UChar, + srcLength: i32, + titleIter: *mut UBreakIterator, + locale: *const ::std::os::raw::c_char, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strFoldCase_76( + dest: *mut UChar, + destCapacity: i32, + src: *const UChar, + srcLength: i32, + options: u32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn u_strToWCS_76( + dest: *mut wchar_t, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut wchar_t; +} +unsafe extern "C" { + pub fn u_strFromWCS_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const wchar_t, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strToUTF8_76( + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_strFromUTF8_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const ::std::os::raw::c_char, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strToUTF8WithSub_76( + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + subchar: UChar32, + pNumSubstitutions: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_strFromUTF8WithSub_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const ::std::os::raw::c_char, + srcLength: i32, + subchar: UChar32, + pNumSubstitutions: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strFromUTF8Lenient_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const ::std::os::raw::c_char, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strToUTF32_76( + dest: *mut UChar32, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar32; +} +unsafe extern "C" { + pub fn u_strFromUTF32_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar32, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strToUTF32WithSub_76( + dest: *mut UChar32, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + subchar: UChar32, + pNumSubstitutions: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar32; +} +unsafe extern "C" { + pub fn u_strFromUTF32WithSub_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar32, + srcLength: i32, + subchar: UChar32, + pNumSubstitutions: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +unsafe extern "C" { + pub fn u_strToJavaModifiedUTF8_76( + dest: *mut ::std::os::raw::c_char, + destCapacity: i32, + pDestLength: *mut i32, + src: *const UChar, + srcLength: i32, + pErrorCode: *mut UErrorCode, + ) -> *mut ::std::os::raw::c_char; +} +unsafe extern "C" { + pub fn u_strFromJavaModifiedUTF8WithSub_76( + dest: *mut UChar, + destCapacity: i32, + pDestLength: *mut i32, + src: *const ::std::os::raw::c_char, + srcLength: i32, + subchar: UChar32, + pNumSubstitutions: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UChar; +} +pub type UReplaceable = *mut ::std::os::raw::c_void; +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UReplaceableCallbacks { + pub length: ::std::option::Option i32>, + pub charAt: + ::std::option::Option UChar>, + pub char32At: ::std::option::Option< + unsafe extern "C" fn(rep: *const UReplaceable, offset: i32) -> UChar32, + >, + pub replace: ::std::option::Option< + unsafe extern "C" fn( + rep: *mut UReplaceable, + start: i32, + limit: i32, + text: *const UChar, + textLength: i32, + ), + >, + pub extract: ::std::option::Option< + unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dst: *mut UChar), + >, + pub copy: ::std::option::Option< + unsafe extern "C" fn(rep: *mut UReplaceable, start: i32, limit: i32, dest: i32), + >, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UReplaceableCallbacks"][::std::mem::size_of::() - 48usize]; + ["Alignment of UReplaceableCallbacks"] + [::std::mem::align_of::() - 8usize]; + ["Offset of field: UReplaceableCallbacks::length"] + [::std::mem::offset_of!(UReplaceableCallbacks, length) - 0usize]; + ["Offset of field: UReplaceableCallbacks::charAt"] + [::std::mem::offset_of!(UReplaceableCallbacks, charAt) - 8usize]; + ["Offset of field: UReplaceableCallbacks::char32At"] + [::std::mem::offset_of!(UReplaceableCallbacks, char32At) - 16usize]; + ["Offset of field: UReplaceableCallbacks::replace"] + [::std::mem::offset_of!(UReplaceableCallbacks, replace) - 24usize]; + ["Offset of field: UReplaceableCallbacks::extract"] + [::std::mem::offset_of!(UReplaceableCallbacks, extract) - 32usize]; + ["Offset of field: UReplaceableCallbacks::copy"] + [::std::mem::offset_of!(UReplaceableCallbacks, copy) - 40usize]; +}; +pub type UTransliterator = *mut ::std::os::raw::c_void; +#[repr(u32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UTransDirection { + UTRANS_FORWARD = 0, + UTRANS_REVERSE = 1, +} +#[repr(C)] +#[derive(Debug, Default, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct UTransPosition { + pub contextStart: i32, + pub contextLimit: i32, + pub start: i32, + pub limit: i32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UTransPosition"][::std::mem::size_of::() - 16usize]; + ["Alignment of UTransPosition"][::std::mem::align_of::() - 4usize]; + ["Offset of field: UTransPosition::contextStart"] + [::std::mem::offset_of!(UTransPosition, contextStart) - 0usize]; + ["Offset of field: UTransPosition::contextLimit"] + [::std::mem::offset_of!(UTransPosition, contextLimit) - 4usize]; + ["Offset of field: UTransPosition::start"] + [::std::mem::offset_of!(UTransPosition, start) - 8usize]; + ["Offset of field: UTransPosition::limit"] + [::std::mem::offset_of!(UTransPosition, limit) - 12usize]; +}; +unsafe extern "C" { + pub fn utrans_openU_76( + id: *const UChar, + idLength: i32, + dir: UTransDirection, + rules: *const UChar, + rulesLength: i32, + parseError: *mut UParseError, + pErrorCode: *mut UErrorCode, + ) -> *mut UTransliterator; +} +unsafe extern "C" { + pub fn utrans_openInverse_76( + trans: *const UTransliterator, + status: *mut UErrorCode, + ) -> *mut UTransliterator; +} +unsafe extern "C" { + pub fn utrans_clone_76( + trans: *const UTransliterator, + status: *mut UErrorCode, + ) -> *mut UTransliterator; +} +unsafe extern "C" { + pub fn utrans_close_76(trans: *mut UTransliterator); +} +unsafe extern "C" { + pub fn utrans_getUnicodeID_76( + trans: *const UTransliterator, + resultLength: *mut i32, + ) -> *const UChar; +} +unsafe extern "C" { + pub fn utrans_register_76(adoptedTrans: *mut UTransliterator, status: *mut UErrorCode); +} +unsafe extern "C" { + pub fn utrans_unregisterID_76(id: *const UChar, idLength: i32); +} +unsafe extern "C" { + pub fn utrans_setFilter_76( + trans: *mut UTransliterator, + filterPattern: *const UChar, + filterPatternLen: i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utrans_countAvailableIDs_76() -> i32; +} +unsafe extern "C" { + pub fn utrans_openIDs_76(pErrorCode: *mut UErrorCode) -> *mut UEnumeration; +} +unsafe extern "C" { + pub fn utrans_trans_76( + trans: *const UTransliterator, + rep: *mut UReplaceable, + repFunc: *const UReplaceableCallbacks, + start: i32, + limit: *mut i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utrans_transIncremental_76( + trans: *const UTransliterator, + rep: *mut UReplaceable, + repFunc: *const UReplaceableCallbacks, + pos: *mut UTransPosition, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utrans_transUChars_76( + trans: *const UTransliterator, + text: *mut UChar, + textLength: *mut i32, + textCapacity: i32, + start: i32, + limit: *mut i32, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utrans_transIncrementalUChars_76( + trans: *const UTransliterator, + text: *mut UChar, + textLength: *mut i32, + textCapacity: i32, + pos: *mut UTransPosition, + status: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn utrans_toRules_76( + trans: *const UTransliterator, + escapeUnprintable: UBool, + result: *mut UChar, + resultLength: i32, + status: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn utrans_getSourceSet_76( + trans: *const UTransliterator, + ignoreFilter: UBool, + fillIn: *mut USet, + status: *mut UErrorCode, + ) -> *mut USet; +} +unsafe extern "C" { + pub fn utrans_open_76( + id: *const ::std::os::raw::c_char, + dir: UTransDirection, + rules: *const UChar, + rulesLength: i32, + parseError: *mut UParseError, + status: *mut UErrorCode, + ) -> *mut UTransliterator; +} +unsafe extern "C" { + pub fn utrans_getID_76( + trans: *const UTransliterator, + buf: *mut ::std::os::raw::c_char, + bufCapacity: i32, + ) -> i32; +} +unsafe extern "C" { + pub fn utrans_unregister_76(id: *const ::std::os::raw::c_char); +} +unsafe extern "C" { + pub fn utrans_getAvailableID_76( + index: i32, + buf: *mut ::std::os::raw::c_char, + bufCapacity: i32, + ) -> i32; +} +#[repr(C)] +#[derive(Copy, Clone)] +pub union UCPTrieData { + pub ptr0: *const ::std::os::raw::c_void, + pub ptr16: *const u16, + pub ptr32: *const u32, + pub ptr8: *const u8, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrieData"][::std::mem::size_of::() - 8usize]; + ["Alignment of UCPTrieData"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrieData::ptr0"][::std::mem::offset_of!(UCPTrieData, ptr0) - 0usize]; + ["Offset of field: UCPTrieData::ptr16"][::std::mem::offset_of!(UCPTrieData, ptr16) - 0usize]; + ["Offset of field: UCPTrieData::ptr32"][::std::mem::offset_of!(UCPTrieData, ptr32) - 0usize]; + ["Offset of field: UCPTrieData::ptr8"][::std::mem::offset_of!(UCPTrieData, ptr8) - 0usize]; +}; +impl Default for UCPTrieData { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(C)] +#[derive(Copy, Clone)] +pub struct UCPTrie { + pub index: *const u16, + pub data: UCPTrieData, + pub indexLength: i32, + pub dataLength: i32, + pub highStart: UChar32, + pub shifted12HighStart: u16, + pub type_: i8, + pub valueWidth: i8, + pub reserved32: u32, + pub reserved16: u16, + pub index3NullOffset: u16, + pub dataNullOffset: i32, + pub nullValue: u32, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of UCPTrie"][::std::mem::size_of::() - 48usize]; + ["Alignment of UCPTrie"][::std::mem::align_of::() - 8usize]; + ["Offset of field: UCPTrie::index"][::std::mem::offset_of!(UCPTrie, index) - 0usize]; + ["Offset of field: UCPTrie::data"][::std::mem::offset_of!(UCPTrie, data) - 8usize]; + ["Offset of field: UCPTrie::indexLength"] + [::std::mem::offset_of!(UCPTrie, indexLength) - 16usize]; + ["Offset of field: UCPTrie::dataLength"][::std::mem::offset_of!(UCPTrie, dataLength) - 20usize]; + ["Offset of field: UCPTrie::highStart"][::std::mem::offset_of!(UCPTrie, highStart) - 24usize]; + ["Offset of field: UCPTrie::shifted12HighStart"] + [::std::mem::offset_of!(UCPTrie, shifted12HighStart) - 28usize]; + ["Offset of field: UCPTrie::type_"][::std::mem::offset_of!(UCPTrie, type_) - 30usize]; + ["Offset of field: UCPTrie::valueWidth"][::std::mem::offset_of!(UCPTrie, valueWidth) - 31usize]; + ["Offset of field: UCPTrie::reserved32"][::std::mem::offset_of!(UCPTrie, reserved32) - 32usize]; + ["Offset of field: UCPTrie::reserved16"][::std::mem::offset_of!(UCPTrie, reserved16) - 36usize]; + ["Offset of field: UCPTrie::index3NullOffset"] + [::std::mem::offset_of!(UCPTrie, index3NullOffset) - 38usize]; + ["Offset of field: UCPTrie::dataNullOffset"] + [::std::mem::offset_of!(UCPTrie, dataNullOffset) - 40usize]; + ["Offset of field: UCPTrie::nullValue"][::std::mem::offset_of!(UCPTrie, nullValue) - 44usize]; +}; +impl Default for UCPTrie { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCPTrieType { + UCPTRIE_TYPE_ANY = -1, + UCPTRIE_TYPE_FAST = 0, + UCPTRIE_TYPE_SMALL = 1, +} +#[repr(i32)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq, Eq)] +pub enum UCPTrieValueWidth { + UCPTRIE_VALUE_BITS_ANY = -1, + UCPTRIE_VALUE_BITS_16 = 0, + UCPTRIE_VALUE_BITS_32 = 1, + UCPTRIE_VALUE_BITS_8 = 2, +} +unsafe extern "C" { + pub fn ucptrie_openFromBinary_76( + type_: UCPTrieType, + valueWidth: UCPTrieValueWidth, + data: *const ::std::os::raw::c_void, + length: i32, + pActualLength: *mut i32, + pErrorCode: *mut UErrorCode, + ) -> *mut UCPTrie; +} +unsafe extern "C" { + pub fn ucptrie_close_76(trie: *mut UCPTrie); +} +unsafe extern "C" { + pub fn ucptrie_getType_76(trie: *const UCPTrie) -> UCPTrieType; +} +unsafe extern "C" { + pub fn ucptrie_getValueWidth_76(trie: *const UCPTrie) -> UCPTrieValueWidth; +} +unsafe extern "C" { + pub fn ucptrie_get_76(trie: *const UCPTrie, c: UChar32) -> u32; +} +unsafe extern "C" { + pub fn ucptrie_getRange_76( + trie: *const UCPTrie, + start: UChar32, + option: UCPMapRangeOption, + surrogateValue: u32, + filter: UCPMapValueFilter, + context: *const ::std::os::raw::c_void, + pValue: *mut u32, + ) -> UChar32; +} +unsafe extern "C" { + pub fn ucptrie_toBinary_76( + trie: *const UCPTrie, + data: *mut ::std::os::raw::c_void, + capacity: i32, + pErrorCode: *mut UErrorCode, + ) -> i32; +} +unsafe extern "C" { + pub fn ucptrie_internalSmallIndex_76(trie: *const UCPTrie, c: UChar32) -> i32; +} +unsafe extern "C" { + pub fn ucptrie_internalSmallU8Index_76(trie: *const UCPTrie, lt1: i32, t2: u8, t3: u8) -> i32; +} +unsafe extern "C" { + pub fn ucptrie_internalU8PrevIndex_76( + trie: *const UCPTrie, + c: UChar32, + start: *const u8, + src: *const u8, + ) -> i32; +} +#[repr(C)] +#[derive(Debug, Copy, Clone)] +pub struct UMutableCPTrie { + _unused: [u8; 0], +} +unsafe extern "C" { + pub fn umutablecptrie_open_76( + initialValue: u32, + errorValue: u32, + pErrorCode: *mut UErrorCode, + ) -> *mut UMutableCPTrie; +} +unsafe extern "C" { + pub fn umutablecptrie_clone_76( + other: *const UMutableCPTrie, + pErrorCode: *mut UErrorCode, + ) -> *mut UMutableCPTrie; +} +unsafe extern "C" { + pub fn umutablecptrie_close_76(trie: *mut UMutableCPTrie); +} +unsafe extern "C" { + pub fn umutablecptrie_fromUCPMap_76( + map: *const UCPMap, + pErrorCode: *mut UErrorCode, + ) -> *mut UMutableCPTrie; +} +unsafe extern "C" { + pub fn umutablecptrie_fromUCPTrie_76( + trie: *const UCPTrie, + pErrorCode: *mut UErrorCode, + ) -> *mut UMutableCPTrie; +} +unsafe extern "C" { + pub fn umutablecptrie_get_76(trie: *const UMutableCPTrie, c: UChar32) -> u32; +} +unsafe extern "C" { + pub fn umutablecptrie_getRange_76( + trie: *const UMutableCPTrie, + start: UChar32, + option: UCPMapRangeOption, + surrogateValue: u32, + filter: UCPMapValueFilter, + context: *const ::std::os::raw::c_void, + pValue: *mut u32, + ) -> UChar32; +} +unsafe extern "C" { + pub fn umutablecptrie_set_76( + trie: *mut UMutableCPTrie, + c: UChar32, + value: u32, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn umutablecptrie_setRange_76( + trie: *mut UMutableCPTrie, + start: UChar32, + end: UChar32, + value: u32, + pErrorCode: *mut UErrorCode, + ); +} +unsafe extern "C" { + pub fn umutablecptrie_buildImmutable_76( + trie: *mut UMutableCPTrie, + type_: UCPTrieType, + valueWidth: UCPTrieValueWidth, + pErrorCode: *mut UErrorCode, + ) -> *mut UCPTrie; +} +pub type __builtin_va_list = [__va_list_tag; 1usize]; +#[repr(C)] +#[derive(Debug, Copy, Clone, Hash, PartialOrd, PartialEq)] +pub struct __va_list_tag { + pub gp_offset: ::std::os::raw::c_uint, + pub fp_offset: ::std::os::raw::c_uint, + pub overflow_arg_area: *mut ::std::os::raw::c_void, + pub reg_save_area: *mut ::std::os::raw::c_void, +} +#[allow(clippy::unnecessary_operation, clippy::identity_op)] +const _: () = { + ["Size of __va_list_tag"][::std::mem::size_of::<__va_list_tag>() - 24usize]; + ["Alignment of __va_list_tag"][::std::mem::align_of::<__va_list_tag>() - 8usize]; + ["Offset of field: __va_list_tag::gp_offset"] + [::std::mem::offset_of!(__va_list_tag, gp_offset) - 0usize]; + ["Offset of field: __va_list_tag::fp_offset"] + [::std::mem::offset_of!(__va_list_tag, fp_offset) - 4usize]; + ["Offset of field: __va_list_tag::overflow_arg_area"] + [::std::mem::offset_of!(__va_list_tag, overflow_arg_area) - 8usize]; + ["Offset of field: __va_list_tag::reg_save_area"] + [::std::mem::offset_of!(__va_list_tag, reg_save_area) - 16usize]; +}; +impl Default for __va_list_tag { + fn default() -> Self { + let mut s = ::std::mem::MaybeUninit::::uninit(); + unsafe { + ::std::ptr::write_bytes(s.as_mut_ptr(), 0, 1); + s.assume_init() + } + } +} diff --git a/rust_icu_sys/bindgen/lib_77.rs b/rust_icu_sys/bindgen/lib_77.rs index dc7f4db..5953b6e 100644 --- a/rust_icu_sys/bindgen/lib_77.rs +++ b/rust_icu_sys/bindgen/lib_77.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.71.1 */ +/* automatically generated by rust-bindgen 0.72.1 */ pub type wchar_t = ::std::os::raw::c_int; pub type __uint16_t = ::std::os::raw::c_ushort; @@ -1522,7 +1522,7 @@ unsafe extern "C" { } unsafe extern "C" { pub fn ubrk_clone_77(bi: *const UBreakIterator, status: *mut UErrorCode) - -> *mut UBreakIterator; + -> *mut UBreakIterator; } unsafe extern "C" { pub fn ubrk_close_77(bi: *mut UBreakIterator); @@ -5099,7 +5099,7 @@ unsafe extern "C" { } unsafe extern "C" { pub fn u_getTimeZoneFilesDirectory_77(status: *mut UErrorCode) - -> *const ::std::os::raw::c_char; + -> *const ::std::os::raw::c_char; } unsafe extern "C" { pub fn u_setTimeZoneFilesDirectory_77(