mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +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
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
namespace nix {
|
||||
|
||||
GlobalConfig::ConfigRegistrations & GlobalConfig::configRegistrations()
|
||||
{
|
||||
static GlobalConfig::ConfigRegistrations configRegistrations;
|
||||
return configRegistrations;
|
||||
}
|
||||
|
||||
bool GlobalConfig::set(const std::string & name, const std::string & value)
|
||||
{
|
||||
for (auto & config : configRegistrations())
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@ struct GlobalConfig : public AbstractConfig
|
|||
{
|
||||
typedef std::vector<Config *> ConfigRegistrations;
|
||||
|
||||
static ConfigRegistrations & configRegistrations()
|
||||
{
|
||||
static ConfigRegistrations configRegistrations;
|
||||
return configRegistrations;
|
||||
}
|
||||
static ConfigRegistrations & configRegistrations();
|
||||
|
||||
bool set(const std::string & name, const std::string & value) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue