Skip to content

Commit

Permalink
Merge pull request #5844 from mathias-lang-sociomantic/mangling-std-zlib
Browse files Browse the repository at this point in the history
Do not expose unmangled ZLIB_VERSION, Z_NULL and ZLIB_VERNUM needlessly
merged-on-behalf-of: Vladimir Panteleev <[email protected]>
  • Loading branch information
dlang-bot authored Nov 6, 2017
2 parents 225ea95 + e66b4e1 commit 7444ea2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 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 Expand Up @@ -227,7 +228,8 @@ enum
}
/* The deflate compression method (the only one supported in this version) */

const int Z_NULL = 0; /* for initializing zalloc, zfree, opaque */
/// for initializing zalloc, zfree, opaque (extern(D) for mangling)
extern(D) immutable void* Z_NULL = null;

/* basic functions */

Expand Down

0 comments on commit 7444ea2

Please sign in to comment.