pike.git
/
src
/
modules
/
Gz
/
zlibmod.c
version
»
Context lines:
10
20
40
80
file
none
3
pike.git/src/modules/Gz/zlibmod.c:690:
pop_n_elems(args); push_string(buffer_finish_pike_string(&buf)); } static void init_gz_deflate(struct object *UNUSED(o)) { mt_init(& THIS->lock);
-
memset(& THIS->gz, 0, sizeof(THIS->gz));
+
THIS->gz.zalloc=Z_NULL; THIS->gz.zfree=Z_NULL; THIS->gz.opaque=(void *)THIS; THIS->state=0; deflateInit(& THIS->gz, THIS->level = Z_DEFAULT_COMPRESSION); THIS->epilogue = NULL; } static void exit_gz_deflate(struct object *UNUSED(o)) { /* mt_lock(& THIS->lock); */ deflateEnd(&THIS->gz); do_free_string(THIS->epilogue); do_free_string(THIS->dict);
-
THIS->dict = NULL;
+
/* mt_unlock(& THIS->lock); */ mt_destroy( & THIS->lock ); } /*! @endclass */ /*******************************************************************/ /*! @class inflate
pike.git/src/modules/Gz/zlibmod.c:1139:
pop_n_elems(args); if(this->epilogue) ref_push_string(this->epilogue); else push_int(0); } static void init_gz_inflate(struct object *UNUSED(o)) { mt_init(& THIS->lock);
-
memset(& THIS->gz, 0, sizeof(THIS->gz));
+
THIS->gz.zalloc=Z_NULL; THIS->gz.zfree=Z_NULL; THIS->gz.opaque=(void *)THIS; inflateInit(&THIS->gz); inflateEnd(&THIS->gz); THIS->epilogue = NULL; } static void exit_gz_inflate(struct object *UNUSED(o)) { /* mt_lock(& THIS->lock); */ inflateEnd(& THIS->gz); do_free_string(THIS->epilogue); do_free_string(THIS->dict);
-
THIS->dict = NULL;
+
/* mt_unlock(& THIS->lock); */ mt_destroy( & THIS->lock ); } /*! @endclass */ /*! @decl int crc32(string(8bit) data, void|int(0..) start_value) *! *! This function calculates the standard ISO3309 Cyclic Redundancy Check.