Skip to main content
target function を replacement function で hook し、original target closure の cloned copy を返します。両方の arguments は functions である必要があります。function はまず pending C function swaps を flush し、function cloning で target を cloning し、replacement closure またはその mapped newcclosure target を hidden stack tracking に追加し、target と cloned original に FixCallstack を呼び、C closure, Luau closure, newcclosure-specific path のいずれかで target closure を patch します。target がまだ hook records にない場合、restorefunction 用に cloned original がそこへ保存されます。returned function は cloned original closure です。

構文

エイリアス

  • hookfunc
  • replaceclosure
  • detourfunction
  • detour_function

引数

戻り値

例

Patch a function closure and keep a cloned original.