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
@@ -163,7 +163,7 @@ async fn serve_server(
|
||||
}
|
||||
|
||||
let hot_root = subsecond::HotFn::current(original_root);
|
||||
let new_root_addr = hot_root.ptr_address() as usize as *const ();
|
||||
let new_root_addr = hot_root.ptr_address().0 as usize as *const ();
|
||||
let new_root = unsafe {
|
||||
std::mem::transmute::<*const (), fn() -> Element>(new_root_addr)
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user