Skip to content

Commit

Permalink
Fix. Build with MSVC
Browse files Browse the repository at this point in the history
  • Loading branch information
moteus committed Mar 18, 2016
1 parent c1c2046 commit f61a5d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua_zlib.c
Expand Up @@ -220,14 +220,15 @@ static void lz_create_deflate_mt(lua_State *L) {
static int lz_deflate_new(lua_State *L) {
int level = luaL_optint(L, 1, Z_DEFAULT_COMPRESSION);
int window_size = luaL_optint(L, 2, MAX_WBITS);
int result;

/* Allocate the stream: */
z_stream* stream = (z_stream*)lua_newuserdata(L, sizeof(z_stream));

stream->zalloc = Z_NULL;
stream->zfree = Z_NULL;

int result = deflateInit2(stream, level, Z_DEFLATED, window_size,
result = deflateInit2(stream, level, Z_DEFLATED, window_size,
DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY);

lz_assert(L, result, stream, __FILE__, __LINE__);
Expand Down

0 comments on commit f61a5d1

Please sign in to comment.