]> granicus.if.org Git - icinga2/commitdiff
Rename/Remove experimental script functions
authorGunnar Beutner <gunnar.beutner@netways.de>
Tue, 9 Aug 2016 07:35:16 +0000 (09:35 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Tue, 9 Aug 2016 08:43:55 +0000 (10:43 +0200)
fixes #12332

lib/base/scriptutils.cpp
lib/config/configitem.cpp
lib/config/configitem.hpp

index 94a0f01cf46f4162e0b46c6f00113ad084f15117..36f73d2700e1de4899c708b384626cb88fa7a8f8 100644 (file)
@@ -65,7 +65,7 @@ REGISTER_SAFE_SCRIPTFUNCTION(escape_shell_arg, &Utility::EscapeShellArg);
 #ifdef _WIN32
 REGISTER_SAFE_SCRIPTFUNCTION(escape_create_process_arg, &Utility::EscapeCreateProcessArg);
 #endif /* _WIN32 */
-REGISTER_SCRIPTFUNCTION(__ptr, &ScriptUtils::Ptr);
+REGISTER_SCRIPTFUNCTION(ptr, &ScriptUtils::Ptr);
 
 String ScriptUtils::CastString(const Value& value)
 {
index 35a717f2e0a4593a2571a91826d2e0c6404d8227..5f95c210e45168495b3502f6c00faa7149af099a 100644 (file)
@@ -46,7 +46,9 @@ ConfigItem::TypeMap ConfigItem::m_Items;
 ConfigItem::ItemList ConfigItem::m_UnnamedItems;
 ConfigItem::IgnoredItemList ConfigItem::m_IgnoredItems;
 
+#ifdef I2_DEBUG
 REGISTER_SCRIPTFUNCTION(__run_with_activation_context, &ConfigItem::RunWithActivationContext);
+#endif /* I2_DEBUG */
 
 /**
  * Constructor for the ConfigItem class.
@@ -612,6 +614,7 @@ bool ConfigItem::ActivateItems(WorkQueue& upq, const std::vector<ConfigItem::Ptr
        return true;
 }
 
+#ifdef I2_DEBUG
 bool ConfigItem::RunWithActivationContext(const Function::Ptr& function)
 {
        ActivationScope scope;
@@ -634,6 +637,7 @@ bool ConfigItem::RunWithActivationContext(const Function::Ptr& function)
 
        return true;
 }
+#endif /* I2_DEBUG */
 
 std::vector<ConfigItem::Ptr> ConfigItem::GetItems(const String& type)
 {
index b9c23d0756e1fe20839cfae9a89c7a2b67f32d50..19aff26a98fcb753dc52121e4e7abcc31d98e0bb 100644 (file)
@@ -71,7 +71,9 @@ public:
        static bool CommitItems(const ActivationContext::Ptr& context, WorkQueue& upq, std::vector<ConfigItem::Ptr>& newItems);
        static bool ActivateItems(WorkQueue& upq, const std::vector<ConfigItem::Ptr>& newItems, bool runtimeCreated = false);
 
+#ifdef I2_DEBUG
        static bool RunWithActivationContext(const Function::Ptr& function);
+#endif /* I2_DEBUG */
 
        static std::vector<ConfigItem::Ptr> GetItems(const String& type);