summaryrefslogtreecommitdiff
path: root/src/modcontext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/modcontext.cc')
-rw-r--r--src/modcontext.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/modcontext.cc b/src/modcontext.cc
index 7941cf5..21b04fd 100644
--- a/src/modcontext.cc
+++ b/src/modcontext.cc
@@ -95,7 +95,12 @@ void ModuleContext::registerBuiltin()
const AbstractFunction *ModuleContext::findLocalFunction(const std::string &name) const
{
if (this->functions_p && this->functions_p->find(name) != this->functions_p->end()) {
- return this->functions_p->find(name)->second;
+ AbstractFunction *f = this->functions_p->find(name)->second;
+ if (!f->is_enabled()) {
+ PRINTB("WARNING: Experimental builtin function '%s' is not enabled.", name);
+ return NULL;
+ }
+ return f;
}
return NULL;
}
@@ -104,6 +109,10 @@ const AbstractModule *ModuleContext::findLocalModule(const std::string &name) co
{
if (this->modules_p && this->modules_p->find(name) != this->modules_p->end()) {
AbstractModule *m = this->modules_p->find(name)->second;
+ if (!m->is_enabled()) {
+ PRINTB("WARNING: Experimental builtin module '%s' is not enabled.", name);
+ return NULL;
+ }
std::string replacement = Builtins::instance()->isDeprecated(name);
if (!replacement.empty()) {
PRINTB("DEPRECATED: The %s() module will be removed in future releases. Use %s() instead.", name % replacement);
contact: Jan Huwald // Impressum