svn commit: samba r7071 - in branches/SAMBA_4_0/source/lib/ejs: .
tridge at samba.org
tridge at samba.org
Sun May 29 11:32:29 GMT 2005
Author: tridge
Date: 2005-05-29 11:32:29 +0000 (Sun, 29 May 2005)
New Revision: 7071
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7071
Log:
allow access to the current mpr memory context from ejs calls
Modified:
branches/SAMBA_4_0/source/lib/ejs/miniMpr.c
branches/SAMBA_4_0/source/lib/ejs/miniMpr.h
Changeset:
Modified: branches/SAMBA_4_0/source/lib/ejs/miniMpr.c
===================================================================
--- branches/SAMBA_4_0/source/lib/ejs/miniMpr.c 2005-05-29 11:16:45 UTC (rev 7070)
+++ branches/SAMBA_4_0/source/lib/ejs/miniMpr.c 2005-05-29 11:32:29 UTC (rev 7071)
@@ -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);
Modified: branches/SAMBA_4_0/source/lib/ejs/miniMpr.h
===================================================================
--- branches/SAMBA_4_0/source/lib/ejs/miniMpr.h 2005-05-29 11:16:45 UTC (rev 7070)
+++ branches/SAMBA_4_0/source/lib/ejs/miniMpr.h 2005-05-29 11:32:29 UTC (rev 7071)
@@ -270,6 +270,7 @@
extern int mprMemcpy(char *dest, int destMax, const char *src, int nbytes);
extern void mprSetCtx(void *ctx);
+extern void *mprMemCtx(void);
#ifdef __cplusplus
}
More information about the samba-cvs
mailing list