Check prototypes for pointer types testcase.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Tue, 7 Sep 2010 22:24:45 +0000 (18:24 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Tue, 7 Sep 2010 22:24:45 +0000 (18:24 -0400)
test/plugin-pointer-types.c
test/pointer-types.xml

index 3a9a0f023f176e2bcab40ab03b451670ca45d623..971c5eebca48cd6164af955246b6067f13cdc121 100644 (file)
@@ -1,4 +1,5 @@
 #include <aop.h>
+#include <stdio.h>
 #include <string.h>
 
 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);
index 2bea47522dffb0d5ca2cafeac419bb6d593fbadb..4ab87c5c88ebe934be8f132739eb1af2567cdf65 100644 (file)
       In void * advice (c_str): other pointer
       str: h4x0r
     </output>
+    <prototypes>
+      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 ***);
+    </prototypes>
   </run>
 </testcase>