From 8a80ae15aae03c1b9e9956203971228972c85974 Mon Sep 17 00:00:00 2001 From: Justin Seyster Date: Tue, 7 Sep 2010 18:24:45 -0400 Subject: [PATCH] Check prototypes for pointer types testcase. --- test/plugin-pointer-types.c | 14 ++++++++++++++ test/pointer-types.xml | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/test/plugin-pointer-types.c b/test/plugin-pointer-types.c index 3a9a0f0..971c5ee 100644 --- a/test/plugin-pointer-types.c +++ b/test/plugin-pointer-types.c @@ -1,4 +1,5 @@ #include +#include #include AOP_I_AM_GPL_COMPATIBLE(); @@ -63,6 +64,19 @@ static unsigned int plugin_pointer() 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); + } +} + AOP_MAIN_PROTO aop_main() { aop_register_pass("float", plugin_pointer); diff --git a/test/pointer-types.xml b/test/pointer-types.xml index 2bea475..4ab87c5 100644 --- a/test/pointer-types.xml +++ b/test/pointer-types.xml @@ -20,5 +20,13 @@ In void * advice (c_str): other pointer str: h4x0r + + void _advice_any_ptr(signed char *, ALL_POINTER_T); + void _advice_any_ptr_ptr(signed char *, ALL_POINTER_T *); + void _advice_c_str(signed char *, signed char *); + void _advice_p(signed char *, int32_t *); + void _advice_pp(signed char *, int32_t **); + void _advice_ppp(signed char *, int32_t ***); + -- 2.43.0