diff options
author | Alex Deymo <deymo@google.com> | 2015-10-13 02:15:31 -0700 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-10-23 20:09:11 -0700 |
commit | 03f1debab429e673ba5e9e317c5a04e36e850cef (patch) | |
tree | e2c288b30f3515aaee669ea377fb3214a02468cf /extents.h | |
parent | 20891f9c246ec36e6c148579522ac00051b64457 (diff) | |
download | bsdiff-03f1debab429e673ba5e9e317c5a04e36e850cef.tar.gz |
bspatch: Use a C++ interface for file access.
This patch moves the exfile.cc implementation to a C++ class with an
abstract interface of a file. The implementation of exfile.cc, renamed
to extents_file.cc, now uses C++ STL classes and has unittests to test
its core functionality.
Bug: 24478450
Test: Unittests added. make all test -j5 && ./unittests
Change-Id: I8d8f07150ad2ea465c55b5178ca9fbab49185eea
Diffstat (limited to 'extents.h')
-rw-r--r-- | extents.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -5,8 +5,9 @@ #ifndef _BSDIFF_EXTENTS_H_ #define _BSDIFF_EXTENTS_H_ -#include "exfile.h" +#include "extents_file.h" +namespace bsdiff { /* Parses a string representation |ex_str| and populates an array |ex_arr| * consisting of |*ex_count_p| extents. The string is expected to be a @@ -23,4 +24,6 @@ * deallocated with free(3). */ ex_t* extents_parse(const char* ex_str, ex_t* ex_arr, size_t* ex_count_p); +} // namespace bsdiff + #endif /* _BSDIFF_EXTENTS_H_ */ |