mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 10:12:39 +01:00
ircd::mods: Use forward_list for mod::loading state.
This commit is contained in:
parent
325c2a34b3
commit
5fa42b5afd
2 changed files with 5 additions and 5 deletions
|
@ -714,12 +714,12 @@ try
|
|||
|
||||
const unwind reset{[this, &theirs]
|
||||
{
|
||||
assert(loading.top() == this);
|
||||
loading.pop();
|
||||
assert(loading.front() == this);
|
||||
loading.pop_front();
|
||||
std::set_terminate(theirs);
|
||||
}};
|
||||
|
||||
loading.push(this);
|
||||
loading.emplace_front(this);
|
||||
std::set_terminate(ours);
|
||||
return boost::dll::shared_library{path, mode};
|
||||
}()}
|
||||
|
@ -766,7 +766,7 @@ try
|
|||
|
||||
if(!loading.empty())
|
||||
{
|
||||
const auto &m(mod::loading.top());
|
||||
const auto &m(mod::loading.front());
|
||||
m->children.emplace_back(this);
|
||||
log::debug
|
||||
{
|
||||
|
|
|
@ -40,7 +40,7 @@ namespace ircd::mods
|
|||
struct ircd::mods::mod
|
||||
:std::enable_shared_from_this<mod>
|
||||
{
|
||||
static std::stack<mod *> loading; // State of current dlopen() recursion.
|
||||
static std::forward_list<mod *> loading; // State of current dlopen() recursion.
|
||||
static std::map<string_view, mod *, std::less<>> loaded;
|
||||
|
||||
filesystem::path path;
|
||||
|
|
Loading…
Reference in a new issue