Please note this is a legacy repository, please go to: https://github.com/minecraft-linux/mcpelauncher-manifest/wiki
GNU General Public License v3.0
312
stars
46
forks
source link
Add support to handle multiple hooks #392
Closed
codehz closed 6 years ago
Example:
A is original function.
=>
means call origin function->
means indirect call by function pointerHook (A, B, B0) call hook_impl(A, B, B0) hooks: (A, (B, B0)) // B => B0 -> A
Hook (A, C, C0) C0 = B0 *B0 = C hooks: (A, (C, C0)) // B => B0 -> C => C0 -> A
Hook (A, D, D0) D0 = C0 *C0 = D hooks: (A, (D, D0)) // B => B0 -> C => C0 -> D => D0 -> A