mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 09:19:36 +01:00
Remove static data from headers
We don't want to duplicate any of these across libraries, which is what happens when the platform doesn't support unique symbols.
This commit is contained in:
parent
3645671570
commit
1b5af49fd0
10 changed files with 37 additions and 26 deletions
|
|
@ -12,11 +12,7 @@ struct RegisterPrimOp
|
|||
{
|
||||
typedef std::vector<PrimOp> PrimOps;
|
||||
|
||||
static PrimOps & primOps()
|
||||
{
|
||||
static PrimOps primOps;
|
||||
return primOps;
|
||||
}
|
||||
static PrimOps & primOps();
|
||||
|
||||
/**
|
||||
* You can register a constant by passing an arity of 0. fun
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ struct PrintOptions
|
|||
* `PrintOptions` for unknown and therefore potentially large values in error messages,
|
||||
* to avoid printing "too much" output.
|
||||
*/
|
||||
static PrintOptions errorPrintOptions = PrintOptions{
|
||||
static constexpr PrintOptions errorPrintOptions = PrintOptions{
|
||||
.ansiColors = true,
|
||||
.maxDepth = 10,
|
||||
.maxAttrs = 10,
|
||||
|
|
|
|||
|
|
@ -40,6 +40,12 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
RegisterPrimOp::PrimOps & RegisterPrimOp::primOps()
|
||||
{
|
||||
static RegisterPrimOp::PrimOps primOps;
|
||||
return primOps;
|
||||
}
|
||||
|
||||
/*************************************************************
|
||||
* Miscellaneous
|
||||
*************************************************************/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue