Skip to content

Commit

Permalink
Do not expose unmangled ZLIB_VERSION and ZLIB_VERNUM needlessly
Browse files Browse the repository at this point in the history
Before this change, ZLIB_VERSION and ZLIB_VERNUM were unmangled TLS variables.
That exposure was unneeded, and could lead to some clash with other zlib binding which would prevent linking.
  • Loading branch information
mathias-lang-sociomantic committed Nov 6, 2017
1 parent 8530971 commit 1f92ebe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions etc/c/zlib.d
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ import core.stdc.config;
nothrow:
extern (C):

const char[] ZLIB_VERSION = "1.2.11";
const ZLIB_VERNUM = 0x12b0;
// Those are extern(D) as they should be mangled
extern(D) immutable string ZLIB_VERSION = "1.2.11";
extern(D) immutable ZLIB_VERNUM = 0x12b0;

/*
The 'zlib' compression library provides in-memory compression and
Expand Down

0 comments on commit 1f92ebe

Please sign in to comment.