All this heat is not useful. Yes, of course Delphi and Free Pascal use a non-standard ABI. That's because there is no standard. Likewise, C++ compilers also have a "non-standard" ABI.
In the absence of standards all we can do is default to the lowest common denominator and, in practice, that usually means the ABI used for the Operating System API. On Windows, this means the stdcall interface used for the Windows API. On Linux/OSX this means the cdecl interface used for libc. In practice, these interfaces are most readily expressed in 'C' and hence a 'C' interface becomes the standard way of expressing a compiler and platform independent API (at least the platform independent bit tends to be achieved with macros that choose the appropriate calling convention). A standard compiler and platform independent OO API sounds a great idea. It's just a pity that it does not exist. On 08/08/14 23:38, Adriano dos Santos Fernandes wrote: > On 08-08-2014 17:30, Dimitry Sibiryakov wrote: >> 08.08.2014 21:59, Adriano dos Santos Fernandes wrote: >>> This is happening just because someone found the current implementation >>> to not work in FreePascal. >> Actually, this is happening just because someone though about C++ only... >> >>> Firebird will continue to be implemented in C++. And be accessible by >>> any language. And this is what serious people are done here. >> And it will happen again, if these "serious people" continue to be >> narrow-minded. >> >> Reality is such, that only one type of interface can work reliably for >> all languages: >> plain C. BTW, you ignored my question "what problem isn't solved with it" - >> a bad sign. >> > Reality is that one tried to convert a C++ API, which we know has is > currently layed-out in C, but may change, and converted wrong. > > If such people try wrong again, it will fail again. > > Reality is that Delphi (or FPC) classes has an unknown ABI. So actually > Delphi and FPC are incompatible. > > If one lays out the vtable as struct of function pointers in Delphi, it > will work. > > As we tend to adopt an IDL processor, we tend to autogenerate these > Delphi/FPC classes in a way it 1) works 2) is good enough to use, like > the C++ binding. > > I found nothing interest, correct or workable in what you propose, so I > have nothing to comment. > > > Adriano > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > Firebird-Devel mailing list, web interface at > https://lists.sourceforge.net/lists/listinfo/firebird-devel ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel