git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcf177c
)
r7081: Add mprToInt() function.
author
Tim Potter
<tpot@samba.org>
Sun, 29 May 2005 22:10:51 +0000
(22:10 +0000)
committer
Gerald (Jerry) Carter
<jerry@samba.org>
Wed, 10 Oct 2007 18:17:13 +0000
(13:17 -0500)
source/scripting/ejs/mprutil.c
patch
|
blob
|
history
diff --git
a/source/scripting/ejs/mprutil.c
b/source/scripting/ejs/mprutil.c
index a1e26ecb2c0c1fd333a72c9edba8d9740ea29fc2..3e47fdf9a36faa018889867911ddf98a3663bc0e 100644
(file)
--- a/
source/scripting/ejs/mprutil.c
+++ b/
source/scripting/ejs/mprutil.c
@@
-132,6
+132,15
@@
const char *mprToString(const struct MprVar *v)
return v->string;
}
+/*
+ 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