Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated Submodule to current Harfbuzz head. #42

Merged
merged 3 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion harfbuzz
Submodule harfbuzz updated 424 files
16 changes: 12 additions & 4 deletions src/bindings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ pub const __MAC_14_1: u32 = 140100;
pub const __MAC_14_2: u32 = 140200;
pub const __MAC_14_3: u32 = 140300;
pub const __MAC_14_4: u32 = 140400;
pub const __MAC_14_5: u32 = 140500;
pub const __IPHONE_2_0: u32 = 20000;
pub const __IPHONE_2_1: u32 = 20100;
pub const __IPHONE_2_2: u32 = 20200;
Expand Down Expand Up @@ -325,6 +326,7 @@ pub const __IPHONE_17_1: u32 = 170100;
pub const __IPHONE_17_2: u32 = 170200;
pub const __IPHONE_17_3: u32 = 170300;
pub const __IPHONE_17_4: u32 = 170400;
pub const __IPHONE_17_5: u32 = 170500;
pub const __WATCHOS_1_0: u32 = 10000;
pub const __WATCHOS_2_0: u32 = 20000;
pub const __WATCHOS_2_1: u32 = 20100;
Expand Down Expand Up @@ -371,6 +373,7 @@ pub const __WATCHOS_10_1: u32 = 100100;
pub const __WATCHOS_10_2: u32 = 100200;
pub const __WATCHOS_10_3: u32 = 100300;
pub const __WATCHOS_10_4: u32 = 100400;
pub const __WATCHOS_10_5: u32 = 100500;
pub const __TVOS_9_0: u32 = 90000;
pub const __TVOS_9_1: u32 = 90100;
pub const __TVOS_9_2: u32 = 90200;
Expand Down Expand Up @@ -418,6 +421,7 @@ pub const __TVOS_17_1: u32 = 170100;
pub const __TVOS_17_2: u32 = 170200;
pub const __TVOS_17_3: u32 = 170300;
pub const __TVOS_17_4: u32 = 170400;
pub const __TVOS_17_5: u32 = 170500;
pub const __BRIDGEOS_2_0: u32 = 20000;
pub const __BRIDGEOS_3_0: u32 = 30000;
pub const __BRIDGEOS_3_1: u32 = 30100;
Expand All @@ -443,6 +447,7 @@ pub const __BRIDGEOS_8_1: u32 = 80100;
pub const __BRIDGEOS_8_2: u32 = 80200;
pub const __BRIDGEOS_8_3: u32 = 80300;
pub const __BRIDGEOS_8_4: u32 = 80400;
pub const __BRIDGEOS_8_5: u32 = 80500;
pub const __DRIVERKIT_19_0: u32 = 190000;
pub const __DRIVERKIT_20_0: u32 = 200000;
pub const __DRIVERKIT_21_0: u32 = 210000;
Expand All @@ -455,8 +460,10 @@ pub const __DRIVERKIT_23_1: u32 = 230100;
pub const __DRIVERKIT_23_2: u32 = 230200;
pub const __DRIVERKIT_23_3: u32 = 230300;
pub const __DRIVERKIT_23_4: u32 = 230400;
pub const __DRIVERKIT_23_5: u32 = 230500;
pub const __VISIONOS_1_0: u32 = 10000;
pub const __VISIONOS_1_1: u32 = 10100;
pub const __VISIONOS_1_2: u32 = 10200;
pub const MAC_OS_X_VERSION_10_0: u32 = 1000;
pub const MAC_OS_X_VERSION_10_1: u32 = 1010;
pub const MAC_OS_X_VERSION_10_2: u32 = 1020;
Expand Down Expand Up @@ -517,7 +524,8 @@ pub const MAC_OS_VERSION_14_1: u32 = 140100;
pub const MAC_OS_VERSION_14_2: u32 = 140200;
pub const MAC_OS_VERSION_14_3: u32 = 140300;
pub const MAC_OS_VERSION_14_4: u32 = 140400;
pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 140400;
pub const MAC_OS_VERSION_14_5: u32 = 140500;
pub const __MAC_OS_X_VERSION_MAX_ALLOWED: u32 = 140500;
pub const __ENABLE_LEGACY_MAC_AVAILABILITY: u32 = 1;
pub const __PTHREAD_SIZE__: u32 = 8176;
pub const __PTHREAD_ATTR_SIZE__: u32 = 56;
Expand Down Expand Up @@ -582,10 +590,10 @@ pub const HB_FONT_NO_VAR_NAMED_INSTANCE: u32 = 4294967295;
pub const HB_BUFFER_REPLACEMENT_CODEPOINT_DEFAULT: u32 = 65533;
pub const HB_UNICODE_COMBINING_CLASS_CCC133: u32 = 133;
pub const HB_UNICODE_MAX_DECOMPOSITION_LEN: u32 = 19;
pub const HB_VERSION_MAJOR: u32 = 8;
pub const HB_VERSION_MINOR: u32 = 4;
pub const HB_VERSION_MAJOR: u32 = 9;
pub const HB_VERSION_MINOR: u32 = 0;
pub const HB_VERSION_MICRO: u32 = 0;
pub const HB_VERSION_STRING: &[u8; 6] = b"8.4.0\0";
pub const HB_VERSION_STRING: &[u8; 6] = b"9.0.0\0";
pub type __int8_t = ::std::os::raw::c_schar;
pub type __uint8_t = ::std::os::raw::c_uchar;
pub type __int16_t = ::std::os::raw::c_short;
Expand Down
2 changes: 1 addition & 1 deletion src/blob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ mod tests {
#[test]
fn test_arc_vec_to_blob_conversion() {
let rc_slice: Arc<Vec<u8>> = Arc::new(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
let blob: Owned<Blob<'static>> = Blob::with_bytes_owned(rc_slice.clone(), |t| &*t);
let blob: Owned<Blob<'static>> = Blob::with_bytes_owned(rc_slice.clone(), |t| t);
assert_eq!(Arc::strong_count(&rc_slice), 2);

assert_eq!(blob.len(), 11);
Expand Down
4 changes: 2 additions & 2 deletions src/buffer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl GenericBuffer {
}

pub(crate) fn pre_allocate(&mut self, size: usize) {
let size = size.min(std::os::raw::c_uint::max_value() as usize);
let size = size.min(std::os::raw::c_uint::MAX as usize);
unsafe { hb_buffer_pre_allocate(self.as_raw(), size as _) };
}

Expand Down Expand Up @@ -647,7 +647,7 @@ impl UnicodeBuffer {
/// ```
///
pub fn append(mut self, other: &UnicodeBuffer) -> UnicodeBuffer {
self.0.append(&other.0, 0, c_uint::max_value());
self.0.append(&other.0, 0, c_uint::MAX);
self
}

Expand Down
2 changes: 1 addition & 1 deletion src/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ pub struct InvalidLanguage;
impl FromStr for Language {
type Err = InvalidLanguage;
fn from_str(s: &str) -> Result<Language, InvalidLanguage> {
let len = std::cmp::min(s.len(), std::i32::MAX as _) as i32;
let len = std::cmp::min(s.len(), i32::MAX as _) as i32;
let lang = unsafe { hb_language_from_string(s.as_ptr() as *mut _, len) };
if lang.is_null() {
Err(InvalidLanguage {})
Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ pub(crate) fn start_end_range(range: impl RangeBounds<usize>) -> (c_uint, c_uint
// We have to do careful bounds checking since c_uint may be of
// different sizes on different platforms. We do assume that
// sizeof(usize) >= sizeof(c_uint).
const MAX_UINT: usize = c_uint::max_value() as usize;
const MAX_UINT: usize = c_uint::MAX as usize;
let start = match range.start_bound() {
Bound::Included(&included) => included.min(MAX_UINT) as c_uint,
Bound::Excluded(&excluded) => excluded.min(MAX_UINT - 1) as c_uint + 1,
Expand All @@ -119,7 +119,7 @@ pub(crate) fn start_end_range(range: impl RangeBounds<usize>) -> (c_uint, c_uint
let end = match range.end_bound() {
Bound::Included(&included) => included.saturating_add(1).min(MAX_UINT) as c_uint,
Bound::Excluded(&excluded) => excluded.min(MAX_UINT) as c_uint,
Bound::Unbounded => c_uint::max_value(),
Bound::Unbounded => c_uint::MAX,
};
(start, end)
}
Expand Down Expand Up @@ -289,7 +289,7 @@ mod tests {
#[test]
fn feature_new() {
let tag = b"abcd".into();
const UINT_MAX: usize = std::os::raw::c_uint::max_value() as usize;
const UINT_MAX: usize = std::os::raw::c_uint::MAX as usize;

let feature = Feature::new(tag, 100, 2..100);
assert_feature(feature, tag, 100, 2, 100);
Expand Down
Loading