mirror of https://github.com/Icinga/icinga2.git
parent
171c137451
commit
caf2812f0d
|
@ -65,6 +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);
|
||||
|
||||
String ScriptUtils::CastString(const Value& value)
|
||||
{
|
||||
|
@ -317,3 +318,7 @@ Array::Ptr ScriptUtils::TrackParents(const Object::Ptr& child)
|
|||
return Array::FromVector(DependencyGraph::GetParents(child));
|
||||
}
|
||||
|
||||
double ScriptUtils::Ptr(const Object::Ptr& object)
|
||||
{
|
||||
return reinterpret_cast<intptr_t>(object.get());
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ public:
|
|||
static void Assert(const Value& arg);
|
||||
static String MsiGetComponentPathShim(const String& component);
|
||||
static Array::Ptr TrackParents(const Object::Ptr& parent);
|
||||
static double Ptr(const Object::Ptr& object);
|
||||
|
||||
private:
|
||||
ScriptUtils(void);
|
||||
|
|
Loading…
Reference in New Issue