summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/module.cc5
-rw-r--r--src/module.h3
2 files changed, 7 insertions, 1 deletions
diff --git a/src/module.cc b/src/module.cc
index fc849ff..cfd73cc 100644
--- a/src/module.cc
+++ b/src/module.cc
@@ -218,6 +218,9 @@ void Module::registerInclude(const std::string &filename)
*/
bool Module::handleDependencies()
{
+ if (this->is_handling_dependencies) return false;
+ this->is_handling_dependencies = true;
+
bool changed = false;
// Iterating manually since we want to modify the container while iterating
Module::ModuleContainer::iterator iter = this->usedlibs.begin();
@@ -236,5 +239,7 @@ bool Module::handleDependencies()
this->usedlibs.erase(curr);
}
}
+
+ this->is_handling_dependencies = false;
return changed;
}
diff --git a/src/module.h b/src/module.h
index cd25287..879d249 100644
--- a/src/module.h
+++ b/src/module.h
@@ -59,7 +59,7 @@ public:
class Module : public AbstractModule
{
public:
- Module() { }
+ Module() : is_handling_dependencies(false) { }
virtual ~Module();
virtual AbstractNode *evaluate(const Context *ctx, const ModuleInstantiation *inst) const;
virtual std::string dump(const std::string &indent, const std::string &name) const;
@@ -71,6 +71,7 @@ public:
void registerInclude(const std::string &filename);
typedef boost::unordered_map<std::string, time_t> IncludeContainer;
IncludeContainer includes;
+ bool is_handling_dependencies;
bool handleDependencies();
std::vector<std::string> assignments_var;
contact: Jan Huwald // Impressum