forked from openkylin/platform_build
Merge "Change the parameter type of offset in read" am: 0889aaeeae
Change-Id: Ib97ac402bab5014137c0a9106d2b36816a420d34
This commit is contained in:
commit
0ee4d0eb4a
|
@ -1221,7 +1221,7 @@ class FileReader : public zip_archive::Reader {
|
||||||
FileReader(FILE* fp) : Reader(), fp_(fp), current_offset_(0) {
|
FileReader(FILE* fp) : Reader(), fp_(fp), current_offset_(0) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ReadAtOffset(uint8_t* buf, size_t len, uint32_t offset) const {
|
bool ReadAtOffset(uint8_t* buf, size_t len, off64_t offset) const {
|
||||||
// Data is usually requested sequentially, so this helps avoid pointless
|
// Data is usually requested sequentially, so this helps avoid pointless
|
||||||
// fseeks every time we perform a read. There's an impedence mismatch
|
// fseeks every time we perform a read. There's an impedence mismatch
|
||||||
// here because the original API was designed around pread and pwrite.
|
// here because the original API was designed around pread and pwrite.
|
||||||
|
@ -1244,7 +1244,7 @@ class FileReader : public zip_archive::Reader {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FILE* fp_;
|
FILE* fp_;
|
||||||
mutable uint32_t current_offset_;
|
mutable off64_t current_offset_;
|
||||||
};
|
};
|
||||||
|
|
||||||
// free the memory when you're done
|
// free the memory when you're done
|
||||||
|
|
Loading…
Reference in New Issue