mirror of
https://github.com/NixOS/nix
synced 2025-06-25 06:31:14 +02:00
Alias traceable_allocator to std::allocator when building without GC
This allows us to get rid of a bunch of #ifdefs.
This commit is contained in:
parent
ca3fc1693b
commit
b9f78abb7f
7 changed files with 8 additions and 52 deletions
|
@ -99,11 +99,7 @@ static const char * makeImmutableString(std::string_view s)
|
|||
|
||||
RootValue allocRootValue(Value * v)
|
||||
{
|
||||
#if HAVE_BOEHMGC
|
||||
return std::allocate_shared<Value *>(traceable_allocator<Value *>(), v);
|
||||
#else
|
||||
return std::make_shared<Value *>(v);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Pretty print types for assertion errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue