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

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:285:    break;       default:    if(THIS->gz.msg)    Pike_error("Failed to initialize Gz.deflate: %s\n",THIS->gz.msg);    else    Pike_error("Failed to initialize Gz.deflate (%d).\n", tmp);    }   }    - #if 0 +    /* @decl Gz.deflate clone()    *    * Clones the deflate object. Typically used to test compression    * of new content using the same exact state.    *    */   static void gz_deflate_clone(INT32 args) {    int tmp;    struct object *ob = low_clone(deflate_program);    struct zipper *clone = get_storage(ob, deflate_program);
pike.git/src/modules/Gz/zlibmod.c:317: Inside #if 0
   Pike_error ("Out of memory while cloning Gz.deflate.\n");    break;       default:    if(THIS->gz.msg)    Pike_error("Failed to clone Gz.deflate: %s\n",THIS->gz.msg);    else    Pike_error("Failed to clone Gz.deflate (%d).\n", tmp);    }   } - #endif +       #ifdef _REENTRANT   static void do_mt_unlock (PIKE_MUTEX_T *lock)   {    mt_unlock (lock);   }   #endif      static int do_deflate(dynamic_buffer *buf,    struct zipper *this,
pike.git/src/modules/Gz/zlibmod.c:1268: Inside #if defined(HAVE_ZLIB_H)
   struct z_stream_s z; /* Used to detect support for extensions. */    int have_rle = 0;    int have_fixed = 0;       start_new_program();    deflate_program = Pike_compiler->new_program;    ADD_STORAGE(struct zipper);       /* function(int|void,int|void,int|void:void) */    ADD_FUNCTION("create",gz_deflate_create,tFunc(tOr(tMapping, tOr(tInt,tVoid)) tOr(tInt,tVoid) tOr(tInt,tVoid),tVoid),0); +  /* function(:Gz.deflate) */ +  ADD_FUNCTION("clone", gz_deflate_clone, tFunc(tVoid,tObj), 0);    /* function(string(8bit)|String.Buffer|System.Memory|Stdio.Buffer,int|void:string(8bit)) */    ADD_FUNCTION("deflate",gz_deflate,tFunc(tOr(tStr8,tObj) tOr(tInt,tVoid),tStr8),0);    ADD_FUNCTION("_size_object", gz_deflate_size, tFunc(tVoid,tInt), 0);       add_integer_constant("NO_FLUSH",Z_NO_FLUSH,0);    add_integer_constant("PARTIAL_FLUSH",Z_PARTIAL_FLUSH,0);    add_integer_constant("SYNC_FLUSH",Z_SYNC_FLUSH,0);    add_integer_constant("FINISH",Z_FINISH,0);    add_integer_constant("DEFAULT_STRATEGY", Z_DEFAULT_STRATEGY,0);    add_integer_constant("FILTERED", Z_FILTERED,0);