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

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: zlibmod.c,v 1.2 1997/02/27 09:06:25 hubbe Exp $"); + RCSID("$Id: zlibmod.c,v 1.3 1997/02/27 09:10:52 hubbe Exp $");      #include "zlib_machine.h"   #include "types.h"      #if !defined(HAVE_LIBZ) && !defined(HAVE_LIBGZ)   #undef HAVE_ZLIB_H   #endif      #ifdef HAVE_ZLIB_H   
pike.git/src/modules/Gz/zlibmod.c:176:    else    error("Error in gz_deflate->deflate(): %d\n",fail);    }       push_string(low_free_buf(&buf));   }         static void init_gz_deflate(struct object *o)   { -  mt_init(& THIS->locked); +  mt_init(& THIS->lock);    MEMSET(& THIS->gz, 0, sizeof(THIS->gz));    THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=THIS;    deflateInit(& THIS->gz, Z_DEFAULT_COMPRESSION);   }      static void exit_gz_deflate(struct object *o)   {    mt_lock(& THIS->lock);
pike.git/src/modules/Gz/zlibmod.c:199:   }      /*******************************************************************/         static void gz_inflate_create(INT32 args)   {    int tmp;    if(THIS->gz.state)    { -  mt_lock(THIS->lock); +  mt_lock(& THIS->lock);    inflateEnd(&THIS->gz); -  mt_unlock(THIS->lock); +  mt_unlock(& THIS->lock);    }          THIS->gz.zalloc=Z_NULL;    THIS->gz.zfree=Z_NULL;    THIS->gz.opaque=THIS;       pop_n_elems(args); -  mt_lock(THIS->lock); +  mt_lock(& THIS->lock);    tmp=inflateInit(& THIS->gz); -  mt_unlock(THIS->lock); +  mt_unlock(& THIS->lock);    switch(tmp)    {    case Z_OK:    return;       case Z_VERSION_ERROR:    error("libz not compatible with zlib.h!!!\n");    break;       default: