On 15 Apr 2008, at 21:22, Martin Schreiber wrote:
On Tuesday 15 April 2008 21.13:41 Jonas Maebe wrote:
On 15 Apr 2008, at 21:05, Martin Schreiber wrote:
Moving msesysintf from implementation uses to interface uses in
msefileutils
fixes the issue.

I know what causes the crc problem: the fact that msesysintf declares
routines as "external name" in the implementation which aren't
declared as "external name" in the interface. This is supported for
Delphi-compatibility, but is quite ugly (it also causes wrappers to be
generated because it is possible that units which were compiled after
only the interface was parsed may already contain calls to the non-
external but regularly mangled Pascal name).

That means all "external name" declarations should be in interface section?

That's the most efficient, yes (and also what we do in the RTL). Alternatively, you can manually create the wrappers in the implementation (so you add separate external declarations in the implementation and then call these from regular Pascal implementations of the interface definitions), so the compiler doesn't do this for you and subsequently change the interface "declaration" into the external definition.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to