summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Compressor.cpp
diff options
context:
space:
mode:
authorTanya Lattner <tonic@nondot.org>2005-01-29 23:29:55 +0000
committerTanya Lattner <tonic@nondot.org>2005-01-29 23:29:55 +0000
commit5ca41e2b68fb477c8e7b877c8d0e3da2d6171fda (patch)
tree91d1a342a97b2a16584b8c9b37075c3180ebd53e /llvm/lib/Support/Compressor.cpp
parent238cf920005e785bb1c5925e65d8f042841e39de (diff)
downloadbcm5719-llvm-5ca41e2b68fb477c8e7b877c8d0e3da2d6171fda.tar.gz
bcm5719-llvm-5ca41e2b68fb477c8e7b877c8d0e3da2d6171fda.zip
Make this work on systems where size_t == unsigned and where they are not
the same. llvm-svn: 19929
Diffstat (limited to 'llvm/lib/Support/Compressor.cpp')
-rw-r--r--llvm/lib/Support/Compressor.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Support/Compressor.cpp b/llvm/lib/Support/Compressor.cpp
index 8d13e746694..49088b88ebd 100644
--- a/llvm/lib/Support/Compressor.cpp
+++ b/llvm/lib/Support/Compressor.cpp
@@ -36,8 +36,8 @@ static int getdata(char*& buffer, size_t &size,
return result;
}
-static int getdata(char*& buffer, unsigned &size,
- llvm::Compressor::OutputDataCallback* cb, void* context) {
+static int getdata_uns(char*& buffer, unsigned &size,
+ llvm::Compressor::OutputDataCallback* cb, void* context) {
size_t SizeOut;
int Res = getdata(buffer, SizeOut, cb, context);
size = SizeOut;
@@ -290,7 +290,7 @@ size_t Compressor::compress(const char* in, size_t size,
}
// Get a block of memory
- if (0 != getdata(bzdata.next_out, bzdata.avail_out,cb,context)) {
+ if (0 != getdata_uns(bzdata.next_out, bzdata.avail_out,cb,context)) {
BZ2_bzCompressEnd(&bzdata);
throw std::string("Can't allocate output buffer");
}
@@ -302,7 +302,7 @@ size_t Compressor::compress(const char* in, size_t size,
// Compress it
int bzerr = BZ_FINISH_OK;
while (BZ_FINISH_OK == (bzerr = BZ2_bzCompress(&bzdata, BZ_FINISH))) {
- if (0 != getdata(bzdata.next_out, bzdata.avail_out,cb,context)) {
+ if (0 != getdata_uns(bzdata.next_out, bzdata.avail_out,cb,context)) {
BZ2_bzCompressEnd(&bzdata);
throw std::string("Can't allocate output buffer");
}
@@ -400,7 +400,7 @@ size_t Compressor::decompress(const char *in, size_t size,
}
// Get a block of memory
- if (0 != getdata(bzdata.next_out, bzdata.avail_out,cb,context)) {
+ if (0 != getdata_uns(bzdata.next_out, bzdata.avail_out,cb,context)) {
BZ2_bzDecompressEnd(&bzdata);
throw std::string("Can't allocate output buffer");
}
@@ -408,7 +408,7 @@ size_t Compressor::decompress(const char *in, size_t size,
// Decompress it
int bzerr = BZ_OK;
while (BZ_OK == (bzerr = BZ2_bzDecompress(&bzdata))) {
- if (0 != getdata(bzdata.next_out, bzdata.avail_out,cb,context)) {
+ if (0 != getdata_uns(bzdata.next_out, bzdata.avail_out,cb,context)) {
BZ2_bzDecompressEnd(&bzdata);
throw std::string("Can't allocate output buffer");
}
OpenPOWER on IntegriCloud