mirror of
https://github.com/mii443/wasmer.git
synced 2025-12-08 05:38:19 +00:00
NFC. Make FunctionBodyPtr hold a const pointer.
This commit is contained in:
@@ -61,10 +61,10 @@ pub const VERSION: &str = env!("CARGO_PKG_VERSION");
|
||||
/// A safe wrapper around `VMFunctionBody`
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
#[repr(transparent)]
|
||||
pub struct FunctionBodyPtr(pub *mut [VMFunctionBody]);
|
||||
pub struct FunctionBodyPtr(pub *const [VMFunctionBody]);
|
||||
|
||||
impl std::ops::Deref for FunctionBodyPtr {
|
||||
type Target = *mut [VMFunctionBody];
|
||||
type Target = *const [VMFunctionBody];
|
||||
|
||||
fn deref(&self) -> &Self::Target {
|
||||
&self.0
|
||||
|
||||
Reference in New Issue
Block a user