[fpc-pascal] function alias
Johann Glaser
Johann.Glaser at gmx.at
Sat Oct 6 23:05:38 CEST 2007
Hi!
> procedure OriginalProc(..).. {$IFDEF USEINLINE_ALIAS}inline;{$ENDIF}
> begin
> end;
> ...
>
> procedure AliasProc(...);
> begin
> {$DEFINE USEINLINE_ALIAS}
> OriginalProc(...);
> {$UNDEF USEINLINE_ALIAS}
> end;
Are you sure this works? AFAIK the "preprocessor" doesn't follow
function calls but simply reads the .pas file from its first line to the
end.
Another problem is that the OP wanted to alias external functions, where
he can't define them as inline.
But he can reverse your approach:
Procedure NewName(...); inline;
Begin
OriginalProc(...);
End;
Bye
Hansi
More information about the fpc-pascal
mailing list