"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/base/function.hpp" between
icinga2-2.11.5.tar.gz and icinga2-2.12.0.tar.gz

About: Icinga 2 is an enterprise grade monitoring system which keeps watch over networks and any conceivable network resource.

function.hpp  (icinga2-2.11.5):function.hpp  (icinga2-2.12.0)
skipping to change at line 63 skipping to change at line 63
Function(const String& name, Callback function, const std::vector<String> & args, Function(const String& name, Callback function, const std::vector<String> & args,
bool side_effect_free, bool deprecated); bool side_effect_free, bool deprecated);
}; };
/* Ensure that the priority is lower than the basic namespace initialization in scriptframe.cpp. */ /* Ensure that the priority is lower than the basic namespace initialization in scriptframe.cpp. */
#define REGISTER_FUNCTION(ns, name, callback, args) \ #define REGISTER_FUNCTION(ns, name, callback, args) \
INITIALIZE_ONCE_WITH_PRIORITY([]() { \ INITIALIZE_ONCE_WITH_PRIORITY([]() { \
Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), false); \ Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), false); \
Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \ Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \
nsp->SetAttribute(#name, std::make_shared<ConstEmbeddedNamespaceV alue>(sf)); \ nsp->SetAttribute(#name, new ConstEmbeddedNamespaceValue(sf)); \
}, 10) }, 10)
#define REGISTER_SAFE_FUNCTION(ns, name, callback, args) \ #define REGISTER_SAFE_FUNCTION(ns, name, callback, args) \
INITIALIZE_ONCE_WITH_PRIORITY([]() { \ INITIALIZE_ONCE_WITH_PRIORITY([]() { \
Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), true); \ Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), true); \
Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \ Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \
nsp->SetAttribute(#name, std::make_shared<ConstEmbeddedNamespaceV alue>(sf)); \ nsp->SetAttribute(#name, new ConstEmbeddedNamespaceValue(sf)); \
}, 10) }, 10)
#define REGISTER_FUNCTION_NONCONST(ns, name, callback, args) \ #define REGISTER_FUNCTION_NONCONST(ns, name, callback, args) \
INITIALIZE_ONCE_WITH_PRIORITY([]() { \ INITIALIZE_ONCE_WITH_PRIORITY([]() { \
Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), false); \ Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), false); \
Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \ Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \
nsp->SetAttribute(#name, std::make_shared<EmbeddedNamespaceValue> (sf)); \ nsp->SetAttribute(#name, new EmbeddedNamespaceValue(sf)); \
}, 10) }, 10)
#define REGISTER_SAFE_FUNCTION_NONCONST(ns, name, callback, args) \ #define REGISTER_SAFE_FUNCTION_NONCONST(ns, name, callback, args) \
INITIALIZE_ONCE_WITH_PRIORITY([]() { \ INITIALIZE_ONCE_WITH_PRIORITY([]() { \
Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), true); \ Function::Ptr sf = new icinga::Function(#ns "#" #name, callback, String(args).Split(":"), true); \
Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \ Namespace::Ptr nsp = ScriptGlobal::Get(#ns); \
nsp->SetAttribute(#name, std::make_shared<EmbeddedNamespaceValue> (sf)); \ nsp->SetAttribute(#name, new EmbeddedNamespaceValue(sf)); \
}, 10) }, 10)
} }
#endif /* FUNCTION_H */ #endif /* FUNCTION_H */
 End of changes. 4 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)