mirror of
https://github.com/denoland/rusty_v8.git
synced 2025-01-21 21:50:20 -05:00
Fix length type of FastApiOneByteString (#1140)
This commit is contained in:
parent
1bf74cca4a
commit
0b9423a0ee
1 changed files with 2 additions and 2 deletions
|
@ -210,7 +210,7 @@ pub struct FastApiTypedArray<T: Default> {
|
|||
#[repr(C)]
|
||||
pub struct FastApiOneByteString {
|
||||
data: *const u8,
|
||||
pub length: usize,
|
||||
pub length: u32,
|
||||
}
|
||||
|
||||
impl FastApiOneByteString {
|
||||
|
@ -220,7 +220,7 @@ impl FastApiOneByteString {
|
|||
unsafe {
|
||||
std::str::from_utf8_unchecked(std::slice::from_raw_parts(
|
||||
self.data,
|
||||
self.length,
|
||||
self.length as usize,
|
||||
))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue