mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Do not use as GlobalPtr class with ctor which needs context pool (i.e. TLS object)
This commit is contained in:
parent
5780811da4
commit
808271e1bf
@ -93,8 +93,8 @@ namespace
|
||||
class StaticConfHolder
|
||||
{
|
||||
public:
|
||||
explicit StaticConfHolder(MemoryPool&)
|
||||
: confFile(FB_NEW(*getDefaultMemoryPool()) ConfigFile(*getDefaultMemoryPool(),
|
||||
explicit StaticConfHolder(MemoryPool& p)
|
||||
: confFile(FB_NEW(p) ConfigFile(p,
|
||||
fb_utils::getPrefix(fb_utils::FB_DIR_CONF, "plugins.conf"), ConfigFile::HAS_SUB_CONF))
|
||||
{
|
||||
}
|
||||
@ -107,11 +107,11 @@ namespace
|
||||
private:
|
||||
RefPtr<ConfigFile> confFile;
|
||||
};
|
||||
GlobalPtr<StaticConfHolder> pluginsConf;
|
||||
InitInstance<StaticConfHolder> pluginsConf;
|
||||
|
||||
RefPtr<ConfigFile> findConfig(const char* param, const char* pluginName)
|
||||
{
|
||||
ConfigFile* f = pluginsConf->get();
|
||||
ConfigFile* f = pluginsConf().get();
|
||||
if (f)
|
||||
{
|
||||
const ConfigFile::Parameter* plugPar = f->findParameter(param, pluginName);
|
||||
|
Loading…
Reference in New Issue
Block a user