From ff293661fcaeff37cf2219c370bfe84a6f4f97be Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 9 Aug 2016 09:35:16 +0200 Subject: [PATCH] Rename/Remove experimental script functions fixes #12332 --- lib/base/scriptutils.cpp | 2 +- lib/config/configitem.cpp | 4 ++++ lib/config/configitem.hpp | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/base/scriptutils.cpp b/lib/base/scriptutils.cpp index 94a0f01cf..36f73d270 100644 --- a/lib/base/scriptutils.cpp +++ b/lib/base/scriptutils.cpp @@ -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) { diff --git a/lib/config/configitem.cpp b/lib/config/configitem.cpp index 35a717f2e..5f95c210e 100644 --- a/lib/config/configitem.cpp +++ b/lib/config/configitem.cpp @@ -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::GetItems(const String& type) { diff --git a/lib/config/configitem.hpp b/lib/config/configitem.hpp index b9c23d075..19aff26a9 100644 --- a/lib/config/configitem.hpp +++ b/lib/config/configitem.hpp @@ -71,7 +71,9 @@ public: static bool CommitItems(const ActivationContext::Ptr& context, WorkQueue& upq, std::vector& newItems); static bool ActivateItems(WorkQueue& upq, const std::vector& newItems, bool runtimeCreated = false); +#ifdef I2_DEBUG static bool RunWithActivationContext(const Function::Ptr& function); +#endif /* I2_DEBUG */ static std::vector GetItems(const String& type);