diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-08-16 11:23:26 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-08-16 11:23:26 -0700 |
commit | a35d78c0f483a65ea96c4f0c9a825bf28a386273 (patch) | |
tree | a20407fc5fbce3b190a364d10c47d807433ec9a5 /builtin/index-pack.c | |
parent | Merge branch 'fk/relink-upon-ldflags-update' into maint (diff) | |
parent | zlib: allow feeding more than 4GB in one go (diff) | |
download | tgif-a35d78c0f483a65ea96c4f0c9a825bf28a386273.tar.xz |
Merge branch 'jc/zlib-wrap' into maint
* jc/zlib-wrap:
zlib: allow feeding more than 4GB in one go
zlib: zlib can only process 4GB at a time
zlib: wrap deflateBound() too
zlib: wrap deflate side of the API
zlib: wrap inflateInit2 used to accept only for gzip format
zlib: wrap remaining calls to direct inflate/inflateEnd
zlib wrapper: refactor error message formatter
Diffstat (limited to 'builtin/index-pack.c')
-rw-r--r-- | builtin/index-pack.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index e40451ffb4..81cdc28b30 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -265,7 +265,7 @@ static void unlink_base_data(struct base_data *c) static void *unpack_entry_data(unsigned long offset, unsigned long size) { int status; - z_stream stream; + git_zstream stream; void *buf = xmalloc(size); memset(&stream, 0, sizeof(stream)); @@ -355,7 +355,7 @@ static void *get_data_from_pack(struct object_entry *obj) off_t from = obj[0].idx.offset + obj[0].hdr_size; unsigned long len = obj[1].idx.offset - from; unsigned char *data, *inbuf; - z_stream stream; + git_zstream stream; int status; data = xmalloc(obj->size); @@ -666,26 +666,26 @@ static void parse_pack_objects(unsigned char *sha1) static int write_compressed(struct sha1file *f, void *in, unsigned int size) { - z_stream stream; + git_zstream stream; int status; unsigned char outbuf[4096]; memset(&stream, 0, sizeof(stream)); - deflateInit(&stream, zlib_compression_level); + git_deflate_init(&stream, zlib_compression_level); stream.next_in = in; stream.avail_in = size; do { stream.next_out = outbuf; stream.avail_out = sizeof(outbuf); - status = deflate(&stream, Z_FINISH); + status = git_deflate(&stream, Z_FINISH); sha1write(f, outbuf, sizeof(outbuf) - stream.avail_out); } while (status == Z_OK); if (status != Z_STREAM_END) die("unable to deflate appended object (%d)", status); size = stream.total_out; - deflateEnd(&stream); + git_deflate_end(&stream); return size; } |