From: Justin Seyster Date: Tue, 7 Sep 2010 22:20:16 +0000 (-0400) Subject: Make int types test case use aop_finish() for writing its header. X-Git-Tag: release-v1.0~48^2~3 X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=ce53e48d0caa04f44d0cf6813d2e2edda327e200;p=interaspect.git Make int types test case use aop_finish() for writing its header. --- diff --git a/test/plugin-int-types.c b/test/plugin-int-types.c index 9f32e76..f5bec2a 100644 --- a/test/plugin-int-types.c +++ b/test/plugin-int-types.c @@ -17,7 +17,6 @@ static void plugin_join_on_call(struct aop_joinpoint *jp, void *data) static unsigned int plugin_int() { - const char *header; struct aop_pointcut *pc; pc = aop_match_function_call(); @@ -68,15 +67,20 @@ static unsigned int plugin_int() aop_filter_call_pc_by_param(pc, 0, aop_t_unsigned128()); aop_join_on(pc, plugin_join_on_call, "_advice_unsigned128"); + return 0; +} + +void aop_finish() +{ + const char *header; header = aop_get_arg_value("header"); + if (header != NULL) { int res; res = aop_write_c_header(header, "_INT_HEADER_", NULL, NULL); if (res != 0) perror(header); } - - return 0; } AOP_MAIN_PROTO aop_main()