Skip to content

Commit 52d966a

Browse files
committed
unix: implement as_mut_ptr for MapData
1 parent ad666a0 commit 52d966a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/unix.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ pub struct MapData {
2424
pub map_ptr: *mut u8,
2525
}
2626

27+
impl MapData {
28+
pub fn as_mut_ptr(&self) -> *mut u8 {
29+
self.map_ptr
30+
}
31+
}
32+
2733
/// Shared memory teardown for linux
2834
impl Drop for MapData {
2935
///Takes care of properly closing the SharedMem (munmap(), shmem_unlink(), close())

0 commit comments

Comments
 (0)