functions for manipulating packets

This commit is contained in:
Vinzenz Schroeter 2025-04-12 12:05:19 +02:00
commit d215f7199e
9 changed files with 80 additions and 36 deletions

View file

@ -280,9 +280,5 @@ pub unsafe extern "C" fn sp_cp437_grid_height(
pub unsafe extern "C" fn sp_cp437_grid_unsafe_data_ref(
cp437_grid: *mut SPCp437Grid,
) -> SPByteSlice {
let data = unsafe { (*cp437_grid).0.data_ref_mut() };
SPByteSlice {
start: NonNull::new(data.as_mut_ptr_range().start).unwrap(),
length: data.len(),
}
unsafe {SPByteSlice::from_slice((*cp437_grid).0.data_ref_mut()) }
}