mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 11:36:03 +01:00
makeRegexCache(): Return a ref
This commit is contained in:
parent
1f6ac88efc
commit
fdc5600fa7
2 changed files with 5 additions and 4 deletions
|
|
@ -191,7 +191,7 @@ std::ostream & operator<<(std::ostream & os, const ValueType t);
|
||||||
|
|
||||||
struct RegexCache;
|
struct RegexCache;
|
||||||
|
|
||||||
std::shared_ptr<RegexCache> makeRegexCache();
|
ref<RegexCache> makeRegexCache();
|
||||||
|
|
||||||
struct DebugTrace
|
struct DebugTrace
|
||||||
{
|
{
|
||||||
|
|
@ -372,6 +372,7 @@ public:
|
||||||
|
|
||||||
const fetchers::Settings & fetchSettings;
|
const fetchers::Settings & fetchSettings;
|
||||||
const EvalSettings & settings;
|
const EvalSettings & settings;
|
||||||
|
|
||||||
SymbolTable symbols;
|
SymbolTable symbols;
|
||||||
PosTable positions;
|
PosTable positions;
|
||||||
|
|
||||||
|
|
@ -504,7 +505,7 @@ private:
|
||||||
/**
|
/**
|
||||||
* Cache used by prim_match().
|
* Cache used by prim_match().
|
||||||
*/
|
*/
|
||||||
std::shared_ptr<RegexCache> regexCache;
|
const ref<RegexCache> regexCache;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4611,9 +4611,9 @@ struct RegexCache
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
std::shared_ptr<RegexCache> makeRegexCache()
|
ref<RegexCache> makeRegexCache()
|
||||||
{
|
{
|
||||||
return std::make_shared<RegexCache>();
|
return make_ref<RegexCache>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void prim_match(EvalState & state, const PosIdx pos, Value ** args, Value & v)
|
void prim_match(EvalState & state, const PosIdx pos, Value ** args, Value & v)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue