summaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFXRefEntry.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2012-06-20 17:20:57 +0200
committerJay Berkenbilt <ejb@ql.org>2012-06-20 21:20:26 +0200
commit5d4cad9c02e9d4f31477fed0e3b20b35c83936f8 (patch)
tree38768f5e4a797e09de304b1e184021f5b280da29 /libqpdf/QPDFXRefEntry.cc
parent24e2b2b76f1f0051f240c8371b2352c4cde85bf9 (diff)
downloadqpdf-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/QPDFXRefEntry.cc')
-rw-r--r--libqpdf/QPDFXRefEntry.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/libqpdf/QPDFXRefEntry.cc b/libqpdf/QPDFXRefEntry.cc
index 9a08c829..dea3aab6 100644
--- a/libqpdf/QPDFXRefEntry.cc
+++ b/libqpdf/QPDFXRefEntry.cc
@@ -9,7 +9,7 @@ QPDFXRefEntry::QPDFXRefEntry() :
{
}
-QPDFXRefEntry::QPDFXRefEntry(int type, int field1, int field2) :
+QPDFXRefEntry::QPDFXRefEntry(int type, off_t field1, int field2) :
type(type),
field1(field1),
field2(field2)
@@ -27,7 +27,7 @@ QPDFXRefEntry::getType() const
return this->type;
}
-int
+off_t
QPDFXRefEntry::getOffset() const
{
if (this->type != 1)
@@ -46,7 +46,7 @@ QPDFXRefEntry::getObjStreamNumber() const
throw std::logic_error(
"getObjStreamNumber called for xref entry of type != 2");
}
- return this->field1;
+ return (int) this->field1;
}
int