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:
François Mockers authored and GitHub committed 2025-05-22 16:32:54 +01:00
1 parent d435f0084e
commit f557fd4d3b
3 files changed
+61 -7

No files matched your search

+2 -2
View File
@@ -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
}
}