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:
committed by
Gerald (Jerry) Carter
parent
fcf177c86e
commit
790a46f53b
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user