←back to thread

217 points varbhat | 1 comments | | HN request time: 0.237s | source
Show context
modeless ◴[] No.44372252[source]
Interesting, but the documentation makes it sound like you have to preemptively wrap all the code you think you might want to change in a special wrapper "call" function. If true that makes this a lot less appealing than existing solutions for other languages that can modify any function without special annotations.
replies(3): >>44372473 #>>44373126 #>>44373784 #
jkelleyrtp ◴[] No.44372473[source]
You basically need to wrap your program's `tick()` function. Otherwise you might be in the middle of malloc, hot-patch, and your struct's layout and alignment changes, and your program crashes due to undefined behavior.

The goal is that frameworks just bake `subsecond::current` into their `tick()` function and end-users get hot-patching for free.

replies(2): >>44372778 #>>44373135 #
1. ◴[] No.44372778[source]