Paul Ishenin schrieb:
Well, it could be done since "const" is implementation-dependent, but
it would force all non-x86 platforms to pass all const parameters by
reference by default, which may not be desirable from an efficiency
point of view.
As I understand not all const parameters are passed by reference in
delphi stdcall implementation but only records? Or say integer/byte will
be passed by reference too?
AFAIK references are used for data types, that exceed the size of an
pointer.
I'd suggest that "constref" works like const, except on platforms or for
external libraries, that expect only references for const arguments. The
exceptions then can be handled by an according mode switch.
DoDi
_______________________________________________
fpc-devel maillist - [email protected]
http://lists.freepascal.org/mailman/listinfo/fpc-devel