1
0
mirror of https://github.com/samba-team/samba.git synced 2025-11-08 16:23:49 +03:00

r7081: Add mprToInt() function.

This commit is contained in:
Tim Potter
2005-05-29 22:10:51 +00:00
committed by Gerald (Jerry) Carter
parent fcf177c86e
commit 790a46f53b

View File

@@ -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