mirror of
https://github.com/KingDuckZ/dindexer.git
synced 2025-07-17 16:34:10 +00:00
Tell libpqtypes to not make copies of strings it receives.
The wrapper now copies boost::string_ref into std::string so it's always safe to pass a string ref, even when it's not null-terminated.
This commit is contained in:
parent
fa12bb2d74
commit
7e737f56a2
2 changed files with 9 additions and 5 deletions
|
@ -133,8 +133,8 @@ namespace din {
|
|||
system_clock::from_time_t(itm.mtime),
|
||||
itm.hash_valid,
|
||||
itm.unreadable,
|
||||
std::string(itm.mime_type.data(), itm.mime_type.size()),
|
||||
std::string(itm.mime_charset.data(), itm.mime_charset.size())
|
||||
itm.mime_type,
|
||||
itm.mime_charset
|
||||
);
|
||||
}
|
||||
conn.query("COMMIT;");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue