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

fix: use *const c_char cast instead of *const i8 #285

Merged
merged 1 commit into from
Oct 17, 2023

Conversation

gferon
Copy link
Contributor

@gferon gferon commented Oct 17, 2023

Fixes the build of rust_icu_ucsdet for Android targets, since c_char is defined a *const u8.

error[E0308]: mismatched types
  --> external/crate_index__rust_icu_ucsdet-4.2.3/src/lib.rs:90:17
   |
88 |             versioned_function!(ucsdet_setText)(
   |             ----------------------------------- arguments to this function are incorrect
89 |                 self.rep.as_ptr(),
90 |                 text.as_ptr() as *const i8,
   |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `*const u8`, found `*const i8`
   |
   = note: expected raw pointer `*const u8`
              found raw pointer `*const i8`

@gferon gferon changed the title Use *const c_char cast instead of *const i8 fix: use *const c_char cast instead of *const i8 Oct 17, 2023
@filmil filmil self-requested a review October 17, 2023 17:39
@filmil filmil merged commit 96c98e9 into google:main Oct 17, 2023
13 checks passed
@gferon gferon deleted the fix-cast-android branch October 23, 2023 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants