summaryrefslogtreecommitdiff
path: root/source4/scripting/ejs/mprutil.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/ejs/mprutil.c')
-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 3c28cb4bf1..c614792d8e 100644
--- a/source4/scripting/ejs/mprutil.c
+++ b/source4/scripting/ejs/mprutil.c
@@ -271,6 +271,15 @@ void mprSetPtr(struct MprVar *v, const char *propname, const void *p)
}
/*
+ set a pointer in a existing MprVar, making it a child of the property
+*/
+void mprSetPtrChild(struct MprVar *v, const char *propname, const void *p)
+{
+ mprSetVar(v, propname, mprCreatePtrVar(discard_const(p), NULL));
+ talloc_steal(mprGetProperty(v, propname, NULL), p);
+}
+
+/*
get a pointer from a MprVar
*/
void *mprGetPtr(struct MprVar *v, const char *propname)