fix: do not hardcode string pointer types (#210)

This commit is contained in:
Yaksh Bariya 2022-10-15 10:35:53 +05:30 committed by GitHub
parent 447c456385
commit f666c95d3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ pub fn feature_from_tag(tag: &str) -> Result<hb_feature_t> {
let mut feature = mem::zeroed();
ensure!(
hb_feature_from_string(
tag.as_ptr() as *const i8,
tag.as_ptr() as *const ::std::os::raw::c_char,
tag.len() as i32,
&mut feature as *mut _
) != 0,
@ -88,7 +88,7 @@ impl HBBuffer {
unsafe {
hb_buffer_add_utf8(
self.buffer,
s.as_ptr() as *const i8,
s.as_ptr() as *const ::std::os::raw::c_char,
s.len() as i32,
0,
s.len() as i32,