Module: xenomai-3
Branch: next
Commit: 4bf34c7757d539e76259a1b2c5218e597756d91c
URL:    
http://git.xenomai.org/?p=xenomai-3.git;a=commit;h=4bf34c7757d539e76259a1b2c5218e597756d91c

Author: Philippe Gerum <r...@xenomai.org>
Date:   Mon Apr 23 18:03:07 2018 +0200

smokey: argument accessors using variables

---

 include/smokey/smokey.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/smokey/smokey.h b/include/smokey/smokey.h
index 5fea66c..ffd91cf 100644
--- a/include/smokey/smokey.h
+++ b/include/smokey/smokey.h
@@ -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);                                   \


_______________________________________________
Xenomai-git mailing list
Xenomai-git@xenomai.org
https://xenomai.org/mailman/listinfo/xenomai-git

Reply via email to