From 4f50d9c49790606e020b6ad5dc657c2095644b3b Mon Sep 17 00:00:00 2001 From: Justin Seyster Date: Mon, 25 Oct 2010 21:28:07 -0400 Subject: [PATCH] Modified inparam test case to also test param capture by type. --- test/plugin-inparam.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/plugin-inparam.c b/test/plugin-inparam.c index 0d83cf5..afd24f3 100644 --- a/test/plugin-inparam.c +++ b/test/plugin-inparam.c @@ -11,8 +11,9 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data) struct aop_dynval *p2; p1 = aop_capture_in_param(jp, 0); - p2 = aop_capture_in_param(jp, 1); - aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_DYNVAL(p1), AOP_DYNVAL(p2), AOP_TERM_ARG); + p2 = aop_capture_in_param_by_type(jp, 1, aop_t_all_fp()); + if (p2 != NULL) + aop_insert_advice(jp, advice_name, AOP_INSERT_BEFORE, AOP_DYNVAL(p1), AOP_DYNVAL(p2), AOP_TERM_ARG); } static unsigned int plugin_int() @@ -22,7 +23,6 @@ static unsigned int plugin_int() pc = aop_match_function_entry(); aop_filter_entry_by_name(pc, "foo"); aop_filter_by_in_param(pc, 0, aop_t_all_signed()); - aop_filter_by_in_param(pc, 1, aop_t_all_fp()); aop_join_on(pc, plugin_join_on_call, "_advice_foo"); return 0; -- 2.34.1