subsecond: Typed HotFn pointer (#4153)
* type the HotFn pointer * can reuse a HotFnPtr to run a hot patched function * unsafe constructor * try_call_with_ptr is unsafe
This commit is contained in:
1 parent
d435f0084e
commit
f557fd4d3b
3 files changed
+61
-7
No files matched your search
@@ -155,7 +155,7 @@ where
|
||||
}
|
||||
|
||||
fn fn_ptr(&self) -> usize {
|
||||
subsecond::HotFn::current(self.clone()).ptr_address() as usize
|
||||
subsecond::HotFn::current(self.clone()).ptr_address().0 as usize
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ where
|
||||
}
|
||||
|
||||
fn fn_ptr(&self) -> usize {
|
||||
subsecond::HotFn::current(self.clone()).ptr_address() as usize
|
||||
subsecond::HotFn::current(self.clone()).ptr_address().0 as usize
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user