On Wed, 26 Sep 2012, Sven Barth wrote:
Am 26.09.2012 12:28, schrieb Marco van de Voort:
In our previous episode, Sven Barth said:
end;
IInterface = IUnknown;
This depends on whether we want to enable $macro in the system unit...
It doesn't work at all since macro's don't export over unit borders.
Nowhere did I mention that it needs to be exported... that's why I thought of
the following as a "convention".
My suggestions (if we do indeed enable it):
intfconst for constref/const
intfdecl for stdcall/cdecl {I would not use extdecl so that there are no
potential conflicts}
libcall was already mentioned. It also helps in a lot of other places, and
kills ninetynine percent of macro use. (which IMHO is always a good thing)
The question is then whether this should indeed be a new calling convention
or merely something that translates to stdcall/cdecl...
I would be in favour of handling it at the level of the parser, but
simply translate to cdecl/stdcall.
I would not use a macro that is handled on the level of the scanner.
The parser has more info at it's disposal, which could be useful if the
behaviour needs to be refined.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel