Re: [fpc-devel] Using Macros for IInterface

2012-09-27 Thread Graeme Geldenhuys
On 2012-09-27 19:16, Florian Klämpfl wrote: > > You care about Delphi compatibility? :) I was waiting for that. I care about coding not having IFDEF yes - so it stays readable. tiOPF is the only project I work on that is a shared code base. Graeme. __

Re: [fpc-devel] Using Macros for IInterface

2012-09-27 Thread Florian Klämpfl
Am 26.09.2012 13:27, schrieb Graeme Geldenhuys: > On 2012-09-26 11:40, Marco van de Voort wrote: >> >> It means the interface will always be constref, and thus no ifdefing >> in FPC >> (if you don't support <2.6.0) will be necessary. > > For fpGUI, I only support the latest stable release of FPC,

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Marco van de Voort
In our previous episode, Sven Barth said: > > I don't know what XE3 improves in that regard. But since FPC encountered > > this problem only after going multiarchitecture, I don't expect Embarcadero > > to deal with that until the new Delphi compiler lands. > > The question is whether Embarcadero

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
Am 26.09.2012 12:37, schrieb michael.vancann...@wisa.be: 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,

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
Am 26.09.2012 13:43, schrieb Marco van de Voort: After all, it seems Delphi doesn't have a constref correct? I don't know what XE3 improves in that regard. But since FPC encountered this problem only after going multiarchitecture, I don't expect Embarcadero to deal with that until the new Delph

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
Am 26.09.2012 13:27, schrieb Graeme Geldenhuys: On 2012-09-26 11:40, Marco van de Voort wrote: It means the interface will always be constref, and thus no ifdefing in FPC (if you don't support <2.6.0) will be necessary. For fpGUI, I only support the latest stable release of FPC, so that would

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > > > It means the interface will always be constref, and thus no ifdefing in FPC > > (if you don't support <2.6.0) will be necessary. > > For fpGUI, I only support the latest stable release of FPC, so that > would be 2.6.0. So I should be fine w

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Graeme Geldenhuys
On 2012-09-26 11:40, Marco van de Voort wrote: It means the interface will always be constref, and thus no ifdefing in FPC (if you don't support <2.6.0) will be necessary. For fpGUI, I only support the latest stable release of FPC, so that would be 2.6.0. So I should be fine with removing tha

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > > You are right! I forgot about that. 2.6.0 already supports constref so > > we can indeed remove the FPC_HAS_CONSTREF part from trunk. > > Awesome! So I guess that could be back ported to 2.6.x (fixes branch) > too - ready for the possible 2.6.

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread michael . vancanneyt
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'

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Graeme Geldenhuys
On 2012-09-26 11:28, Sven Barth wrote: You are right! I forgot about that. 2.6.0 already supports constref so we can indeed remove the FPC_HAS_CONSTREF part from trunk. Awesome! So I guess that could be back ported to 2.6.x (fixes branch) too - ready for the possible 2.6.2 release some day?

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Graeme Geldenhuys
On 2012-09-26 11:23, michael.vancann...@wisa.be wrote: Since years I am a proponent of a libcall calling convention which translates to the common library calling convention for the platform. I like that idea. Regards, - Graeme - ___ fpc-devel m

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
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

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread 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. > My suggestions (if we do indeed enable it): > intfconst

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
Am 26.09.2012 12:23, schrieb michael.vancann...@wisa.be: The FPC_HAS_CONSTREF should disappear as soon as the RTL must not be compilable with a previous version that does not have CONSTREF. (which in fact could be 2.6.0, but someone would have to confirm that) You are right! I forgot about that

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread Sven Barth
Am 26.09.2012 12:16, schrieb Graeme Geldenhuys: On 2012-09-25 22:16, Henry Vermaak wrote:> I've used a macro for this in the past. E.g. : > > {$macro on} > {$ifdef windows} >{$define CCONV:=stdcall} > {$else} >{$define CCONV:=cdecl} > {$endif} > > Then use CCONV where you would

Re: [fpc-devel] Using Macros for IInterface

2012-09-26 Thread michael . vancanneyt
On Wed, 26 Sep 2012, Graeme Geldenhuys wrote: On 2012-09-25 22:16, Henry Vermaak wrote:> I've used a macro for this in the past. E.g. : {$macro on} {$ifdef windows} {$define CCONV:=stdcall} {$else} {$define CCONV:=cdecl} {$endif} Then use CCONV where you would specify the calling con

[fpc-devel] Using Macros for IInterface

2012-09-26 Thread Graeme Geldenhuys
On 2012-09-25 22:16, Henry Vermaak wrote:> I've used a macro for this in the past. E.g. : > > {$macro on} > {$ifdef windows} >{$define CCONV:=stdcall} > {$else} >{$define CCONV:=cdecl} > {$endif} > > Then use CCONV where you would specify the calling convention. Couldn't something like