Strongly type InitProc and ExitProc
Original Reporter info from Mantis: runewalsh
-
Reporter name:
Original Reporter info from Mantis: runewalsh
- Reporter name:
Description:
ExitProc allows you not to call an old ExitProc manually, but instead set the old callback during the execution of your one and RTL will call it again for you, i. e.
var
oldExitProc: CodePointer;
procedure MyExitProc;
begin
// do your stuff
ExitProc := prevExitProc;
end;
prevExitProc := ExitProc;
ExitProc := @MyExitProc;
So with ExitProc, lack of a typing isn't that annoyance.
But InitProc doesn't do it: you must call the previous one manually, and thus cast it to TProcedure.
So.
Why would they be CodePointers and not TProcedures in the first place?
Mantis conversion info:
- Mantis ID: 37318