What does this implement/fix? Explain your changes.
Update register_hook to set _old as expected
With this change, orig is never NULL if the hook succeeds, so this PR removes the NULL check at the call-site
Does this close any currently open issues?
Not that I know of
Any relevant logs, error output, etc?
No
Any other comments?
This is a performance improvement for the case where orig was previously NULL (when hooking a method on a class that was implemented originally only in a superclass)
What does this implement/fix? Explain your changes.
register_hook
to set_old
as expectedorig
is neverNULL
if the hook succeeds, so this PR removes theNULL
check at the call-siteDoes this close any currently open issues?
Not that I know of
Any relevant logs, error output, etc?
No
Any other comments?
This is a performance improvement for the case where
orig
was previouslyNULL
(when hooking a method on a class that was implemented originally only in a superclass)Where has this been tested?
Operating System: macOS
Platform: macOS
Target Platform: macOS
Toolchain Version:
Apple clang version 14.0.3
SDK Version:
MacOSX13.3.sdk