diff options
author | Jay Berkenbilt <ejb@ql.org> | 2012-06-20 17:20:57 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2012-06-20 21:20:26 +0200 |
commit | 5d4cad9c02e9d4f31477fed0e3b20b35c83936f8 (patch) | |
tree | 38768f5e4a797e09de304b1e184021f5b280da29 /libqpdf/Buffer.cc | |
parent | 24e2b2b76f1f0051f240c8371b2352c4cde85bf9 (diff) | |
download | qpdf-5d4cad9c02e9d4f31477fed0e3b20b35c83936f8.tar.zst |
ABI change: fix use of off_t, size_t, and integer types
Significantly improve the code's use of off_t for file offsets, size_t
for memory sizes, and integer types in cases where there has to be
compatibility with external interfaces. Rework sections of the code
that would have prevented qpdf from working on files larger than 2 (or
maybe 4) GB in size.
Diffstat (limited to 'libqpdf/Buffer.cc')
-rw-r--r-- | libqpdf/Buffer.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libqpdf/Buffer.cc b/libqpdf/Buffer.cc index 71e219a1..94e69a56 100644 --- a/libqpdf/Buffer.cc +++ b/libqpdf/Buffer.cc @@ -7,12 +7,12 @@ Buffer::Buffer() init(0, 0, true); } -Buffer::Buffer(unsigned long size) +Buffer::Buffer(size_t size) { init(size, 0, true); } -Buffer::Buffer(unsigned char* buf, unsigned long size) +Buffer::Buffer(unsigned char* buf, size_t size) { init(size, buf, false); } @@ -36,7 +36,7 @@ Buffer::~Buffer() } void -Buffer::init(unsigned long size, unsigned char* buf, bool own_memory) +Buffer::init(size_t size, unsigned char* buf, bool own_memory) { this->own_memory = own_memory; this->size = size; @@ -75,7 +75,7 @@ Buffer::destroy() this->buf = 0; } -unsigned long +size_t Buffer::getSize() const { return this->size; |