構文
エイリアス
hookfuncreplaceclosuredetourfunctiondetour_function
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 です。
hookfuncreplaceclosuredetourfunctiondetour_function