Commit 59ba26a8 authored by Philippe Gerum's avatar Philippe Gerum
Browse files

smokey: argument accessors using variables

parent ab264d5f
......@@ -105,6 +105,11 @@ struct smokey_test {
#define SMOKEY_ARG_BOOL(__plugin, __arg) (!!SMOKEY_ARG_INT(__plugin, __arg))
#define SMOKEY_ARG_STRING(__plugin, __arg) (SMOKEY_ARG(__plugin, __arg)->u.s_val)
#define smokey_arg_isset(__t, __name) (smokey_lookup_arg(__t, __name)->matched)
#define smokey_arg_int(__t, __name) (smokey_lookup_arg(__t, __name)->u.n_val)
#define smokey_arg_bool(__t, __name) (!!smokey_arg_int(__t, __name))
#define smokey_arg_string(__t, __name) (smokey_lookup_arg(__t, __name)->u.s_val)
#define smokey_check_errno(__expr) \
({ \
int __ret = (__expr); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment