[llvm-commits] CVS: llvm/lib/Support/Compressor.cpp
Tanya Brethour
tbrethou at cs.uiuc.edu
Sat Jan 29 15:30:11 PST 2005
Changes in directory llvm/lib/Support:
Compressor.cpp updated: 1.14 -> 1.15
---
Log message:
Make this work on systems where size_t == unsigned and where they are not
the same.
---
Diffs of the changes: (+6 -6)
Compressor.cpp | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Index: llvm/lib/Support/Compressor.cpp
diff -u llvm/lib/Support/Compressor.cpp:1.14 llvm/lib/Support/Compressor.cpp:1.15
--- llvm/lib/Support/Compressor.cpp:1.14 Sat Jan 29 17:08:01 2005
+++ llvm/lib/Support/Compressor.cpp Sat Jan 29 17:29:55 2005
@@ -36,8 +36,8 @@
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 @@
}
// 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 @@
// 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 @@
}
// 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 @@
// 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");
}
More information about the llvm-commits
mailing list