summaryrefslogtreecommitdiff
path: root/source4/lib/ejs/miniMpr.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-05-29 11:32:29 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:17:12 -0500
commit973ea5feb1952a6be443b66d5b49ca6c908a2c92 (patch)
tree153bd2120cfb03e04e51a7acb75313da3bed6a1e /source4/lib/ejs/miniMpr.c
parent1cada765202cb6e229ece1f3fab29076471a7e13 (diff)
downloadsamba-973ea5feb1952a6be443b66d5b49ca6c908a2c92.tar.gz
samba-973ea5feb1952a6be443b66d5b49ca6c908a2c92.tar.bz2
samba-973ea5feb1952a6be443b66d5b49ca6c908a2c92.zip
r7071: allow access to the current mpr memory context from ejs calls
(This used to be commit a58531dcf30b091913563ca2b8ce5e5843896441)
Diffstat (limited to 'source4/lib/ejs/miniMpr.c')
-rw-r--r--source4/lib/ejs/miniMpr.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source4/lib/ejs/miniMpr.c b/source4/lib/ejs/miniMpr.c
index 2094052b39..8b969289b0 100644
--- a/source4/lib/ejs/miniMpr.c
+++ b/source4/lib/ejs/miniMpr.c
@@ -37,11 +37,18 @@
static void *mpr_ctx;
+/* set the memory context to be used for all ejs variables */
void mprSetCtx(TALLOC_CTX *ctx)
{
mpr_ctx = ctx;
}
+/* return the memory context being used for all ejs variables */
+void *mprMemCtx(void)
+{
+ return mpr_ctx;
+}
+
void mprFree(void *ptr)
{
talloc_free(ptr);