[Zlib-devel] zlib 1.2.0.1 available for testing
Cosmin Truta
cosmin at cs.toronto.edu
Wed Apr 2 22:48:01 EST 2003
Christian Spieler wrote:
> just short: my opinion: do not split calling interface between static
> lib and dll; support only one kind of interface - in other words - get
> to a final decision; I favour stdcall because that is the "standard"
> for compiler-language-independent calling interfaces on Win32; most
> important: don't break existing apps (e.g. Novell client distributes
> zlib 1.1.4, they use stdcall because their zlib is drop-in compatible
> with the compilation of zlib.dll v1.2.0.1!).
I realize that binary compatibility is important, and...
> Moreover: the 4 callback function (allocation replacements and the 2
> new buffer handler for inflate-callback) are currently NOT decorated
> with ZEXPORT, so they use __cdecl regardless of the ZEXPORT settings.
> These callbacks are for advanced use only and could (should?) keep the
> "C-standard" calling convention.
Great! It means that the community who wants binary compatibility AND
the community who wants source compatibility can be satisfied.
The only thing that remains essential is not to decorate the callbacks,
and perhaps a note in the documentation, stating that zalloc(),
zcfree(),
(*in_func)(), (*out_func)() must never be decorated with ZEXPORT.
[BTW: shouldn't in_func be zin_func, and out_func be zout_func?]
So, this is the newly-proposed code for zconf.h. I am using CDECL
instead of WINAPIV. As we saw, WINAPIV may not exist, but CDECL always
exists, and it means the same thing anyway. We don't even need ZAPI
anymore.
I will send the patch right away.
Cosmin
More information about the Zlib-devel
mailing list