Skip to content

Commit c88ed47

Browse files
fix cross platform c build
1 parent 5b629e2 commit c88ed47

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ffi/value.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ pub extern "C" fn tsrun_string_len(
277277
return ptr::null_mut();
278278
}
279279

280-
let bytes = unsafe { core::slice::from_raw_parts(s, len) };
280+
let bytes = unsafe { core::slice::from_raw_parts(s.cast::<u8>(), len) };
281281
let s_str = match core::str::from_utf8(bytes) {
282282
Ok(s) => s,
283283
Err(_) => return ptr::null_mut(),

0 commit comments

Comments
 (0)