google / rust_icu

rust_icu: rust bindings for ICU (International Components for Unicode) library
Apache License 2.0
113 stars 34 forks source link

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

Closed gferon closed 11 months ago

gferon commented 11 months ago

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`