mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 17:46:16 +02:00
crucible: add missing template specializations of pwrite helper functions
I got a little too enthusiastic when redacting the code, and removed some overloaded functions bees was using. C++ silently found replacements, and the result was a bug that prevented any data from being persisted from the hash table. Fixes: https://github.com/Zygo/bees/issues/7
This commit is contained in:
@ -120,6 +120,9 @@ namespace crucible {
|
||||
template<> void pread_or_die<string>(int fd, string& str, off_t offset);
|
||||
template<> void pread_or_die<vector<char>>(int fd, vector<char>& str, off_t offset);
|
||||
template<> void pread_or_die<vector<uint8_t>>(int fd, vector<uint8_t>& str, off_t offset);
|
||||
template<> void pwrite_or_die<string>(int fd, const string& str, off_t offset);
|
||||
template<> void pwrite_or_die<vector<char>>(int fd, const vector<char>& str, off_t offset);
|
||||
template<> void pwrite_or_die<vector<uint8_t>>(int fd, const vector<uint8_t>& str, off_t offset);
|
||||
|
||||
// A different approach to reading a simple string
|
||||
string read_string(int fd, size_t size);
|
||||
|
Reference in New Issue
Block a user