svn commit: samba r7081 - in branches/SAMBA_4_0/source/scripting/ejs: .

tpot at samba.org tpot at samba.org
Sun May 29 22:10:52 GMT 2005


Author: tpot
Date: 2005-05-29 22:10:51 +0000 (Sun, 29 May 2005)
New Revision: 7081

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=7081

Log:
Add mprToInt() function.

Modified:
   branches/SAMBA_4_0/source/scripting/ejs/mprutil.c


Changeset:
Modified: branches/SAMBA_4_0/source/scripting/ejs/mprutil.c
===================================================================
--- branches/SAMBA_4_0/source/scripting/ejs/mprutil.c	2005-05-29 21:45:38 UTC (rev 7080)
+++ branches/SAMBA_4_0/source/scripting/ejs/mprutil.c	2005-05-29 22:10:51 UTC (rev 7081)
@@ -133,6 +133,15 @@
 }
 
 /*
+  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
 */



More information about the samba-cvs mailing list