Closed shemetz closed 4 years ago
I believe the fix is to add a type
argument to the shim register
function, and if that type is override, to call fn without the original
argument.
You are completely right, this was an oversight from my end.
Originally, the OVERRIDE
type would also receive the next_fn
argument. This was changed later on, but by then I had already written the shim, and forgot to change the test-case for it.
3259c85 fixes this, by properly checking the type
parameter for OVERRIDE
. It also tweaks the test cases to ensure that this situation (OVERRIDE
with parameters) is correctly tested.
Thanks for the report, and sorry for any inconvenience!
In the shim code, functions are called like this:
In the module code they're called like this:
except if they're OVERRIDE type, in which case they're called like this:
This breaks the behavior of shimmed override functions (e.g. in my module, ZoomPanOptions) when the module exists. The
next_fn
argument is not passed.