pike.git / src / modules / Gz / zlibmod.c

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:241:    strategy != Z_HUFFMAN_ONLY)    {    Pike_error("Invalid compression strategy for gz_deflate->create()\n");    }    }       THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=(void *)THIS;    -  pop_n_elems(args); +    /* mt_lock(& THIS->lock); */    do {    tmp=deflateInit2(&THIS->gz, THIS->level, Z_DEFLATED, wbits, 9, strategy );    if (tmp == Z_STREAM_ERROR) {    /* zlib 1.1.4's deflateInit2() only supports wbits 9..15 (not 8). */    if (wbits == -8) wbits = -9;    else if (wbits == 8) wbits = 9;    else break;    continue;    }
pike.git/src/modules/Gz/zlibmod.c:764:    THIS->dict = tmp->u.string;    add_ref(THIS->dict);    }    if (GET_TYPE(INT, "window_size"))    *tmp_p=inflateInit2(& THIS->gz, tmp->u.integer);    else    *tmp_p=inflateInit( &THIS->gz );    }    else    { -  if( args && TYPEOF(Pike_sp[-1]) == PIKE_T_INT ) +  if( args && TYPEOF(Pike_sp[-1]) == PIKE_T_INT )    {    tmp=inflateInit2(& THIS->gz, Pike_sp[-1].u.integer);    }    else    {    tmp=inflateInit( &THIS->gz );    }    } -  pop_n_elems(args); +       /* mt_lock(& THIS->lock); */   /* mt_unlock(& THIS->lock); */    switch(tmp)    {    case Z_OK:   #if 0 /* this apparently works with newer zlibs only. */    if (THIS->dict) {    int err;