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

version» Context lines:

pike.git/src/modules/Gz/zlibmod.c:21:   #include "svalue.h"   #include "stralloc.h"   #include "array.h"   #include "pike_macros.h"   #include "stralloc.h"   #include "object.h"   #include "pike_types.h"   #include "threads.h"   #include "dynamic_buffer.h"   #include "operators.h" + #include "bignum.h"      #include <zlib.h>         #define sp Pike_sp      struct zipper   {    int level;    int state;
pike.git/src/modules/Gz/zlibmod.c:1172:    else    crc=(unsigned INT32)sp[1-args].u.integer;    } else    crc=0;       crc=crc32(crc,    (unsigned char*)sp[-args].u.string->str,    (unsigned INT32)(sp[-args].u.string->len));       pop_n_elems(args); -  push_int((INT32)crc); +  push_int64((INT64)crc);   }      static void gz_deflate_size( INT32 args )   {   #define L_CODES (256 + 29 + 1)   #define HEAP_SIZE (2*L_CODES+1)       pop_n_elems(args);    /* estimation, from reading deflate.h. We could get a rather exact    * value if we saved memlevel + windowbits somewhere.
pike.git/src/modules/Gz/zlibmod.c:1294: Inside #if defined(HAVE_ZLIB_H) and #if defined(Z_RLE)
   add_integer_constant("RLE", Z_RLE,0);    }   #endif   #ifdef Z_FIXED    if (have_fixed) {    add_integer_constant("FIXED", Z_FIXED,0);    }   #endif       /* function(string(8bit),void|int:int) */ -  ADD_FUNCTION("crc32",gz_crc32,tFunc(tStr8 tOr(tVoid,tInt),tInt),0); +  ADD_FUNCTION("crc32",gz_crc32,tFunc(tStr8 tOr(tVoid,tInt),tIntPos),0);       /* function(string(8bit)|String.Buffer|System.Memory|Stdio.Buffer,void|int(0..1),void|int,void|int:string(8bit)) */    ADD_FUNCTION("compress",gz_compress,tFunc(tOr(tStr8,tObj) tOr(tVoid,tInt01) tOr(tVoid,tInt09) tOr(tVoid,tInt) tOr(tVoid,tInt),tStr8),0);       /* function(string(8bit)|String.Buffer|System.Memory|Stdio.Buffer,void|int(0..1):string(8bit)) */    ADD_FUNCTION("uncompress",gz_uncompress,tFunc(tOr(tStr8,tObj) tOr(tVoid,tInt01),tStr8),0);       PIKE_MODULE_EXPORT(Gz, crc32);    PIKE_MODULE_EXPORT(Gz, zlibmod_pack);    PIKE_MODULE_EXPORT(Gz, zlibmod_unpack);