mirror of
https://github.com/NixOS/nix
synced 2025-07-01 08:28:00 +02:00
Deduplicate string literal rendering, fix 4909
This commit is contained in:
parent
8f0ec323ea
commit
4e0804c920
7 changed files with 86 additions and 39 deletions
|
@ -313,6 +313,15 @@ Derivation parseDerivation(const Store & store, std::string && s, std::string_vi
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Print a derivation string literal to an std::string.
|
||||
*
|
||||
* This syntax does not generalize to the expression language, which needs to
|
||||
* escape `$`.
|
||||
*
|
||||
* @param res Where to print to
|
||||
* @param s Which logical string to print
|
||||
*/
|
||||
static void printString(std::string & res, std::string_view s)
|
||||
{
|
||||
boost::container::small_vector<char, 64 * 1024> buffer;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue