summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs')
-rw-r--r--source4/scripting/ejs/mprutil.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/scripting/ejs/mprutil.c b/source4/scripting/ejs/mprutil.c
index a1e26ecb2c..3e47fdf9a3 100644
--- a/source4/scripting/ejs/mprutil.c
+++ b/source4/scripting/ejs/mprutil.c
@@ -133,6 +133,15 @@ const char *mprToString(const struct MprVar *v)
}
/*
+ turn a MprVar integer variable into an int
+ */
+int mprToInt(const struct MprVar *v)
+{
+ if (v->type != MPR_TYPE_INT) return 0;
+ return v->integer;
+}
+
+/*
turn a MprVar object variable into a string list
this assumes the object variable consists only of strings
*/