Business-KontoCheck
view release on metacpan or search on metacpan
zlib/contrib/pascal/readme.txt view on Meta::CPAN
- The C and zlib-supplied types int, uInt, long, uLong, etc. are
translated directly into Pascal types of similar sizes (Integer,
LongInt, etc.), to avoid namespace pollution. In particular,
there is no conversion of unsigned int into a Pascal unsigned
integer. The Word type is non-portable and has the same size
(16 bits) both in a 16-bit and in a 32-bit environment, unlike
Integer. Even if there is a 32-bit Cardinal type, there is no
real need for unsigned int in zlib under a 32-bit environment.
- Except for the callbacks, the zlib function interfaces are
assuming the calling convention normally used in Pascal
(__pascal for DOS and Windows16, __fastcall for Windows32).
Since the cdecl keyword is used, the old Turbo Pascal does
not work with this interface.
- The gz* function interfaces are not translated, to avoid
interfacing problems with the C runtime library. Besides,
gzprintf(gzFile file, const char *format, ...)
cannot be translated into Pascal.
zlib/win32/DLL_FAQ.txt view on Meta::CPAN
functions, just like CDECL. It is unfortunate that, in spite
of using STDCALL in the Windows API, it is not the default
convention used by the C compilers that run under Windows.
The roots of the problem reside deep inside the unsafety of
the K&R-style function prototypes, where the argument types
are not specified; but that is another story for another day.
The remaining fact is that CDECL is the default convention.
Even if an explicit convention is hard-coded into the function
prototypes inside C headers, problems may appear. The
necessity to expose the convention in users' callbacks is one
of these problems.
The calling convention issues are also important when using
zlib in other programming languages. Some of them, like Ada
(GNAT) and Fortran (GNU G77), have C bindings implemented
initially on Unix, and relying on the C calling convention.
On the other hand, the pre- .NET versions of Microsoft Visual
Basic require STDCALL, while Borland Delphi prefers, although
it does not require, FASTCALL.
( run in 1.476 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )