[fpc-devel] Using Macros for IInterface

Sven Barth pascaldragon at googlemail.com
Wed Sep 26 12:32:03 CEST 2012

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...

If that is decided it would be rather easy to implement and if it would 
be agreed I would implement it.


More information about the fpc-devel mailing list