Skip to content

Commit

Permalink
Add safe user_data getter
Browse files Browse the repository at this point in the history
  • Loading branch information
LPGhatguy committed Oct 28, 2024
1 parent 8e5ed61 commit 0a8c02f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crates/rolt/src/body.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ impl<'interface> Body<'interface> {
BodyId::new(raw)
}

pub fn user_data(&self) -> u64 {
let raw = unsafe { JPC_Body_GetUserData(self.inner) };
raw
}

pub fn as_raw(&self) -> *mut JPC_Body {
self.inner
}
Expand Down

0 comments on commit 0a8c02f

Please sign in to comment.