Added convenience functions for specifying pointers to structs/unions.
authorJustin Seyster <jseyster@cs.sunysb.edu>
Fri, 27 Aug 2010 00:15:28 +0000 (20:15 -0400)
committerJustin Seyster <jseyster@cs.sunysb.edu>
Fri, 27 Aug 2010 00:15:28 +0000 (20:15 -0400)
src/aop-type.c
src/aop.h

index 9066c8865eef8fb7e4087243d06d3070e88d1e1e..44a50822e35c7a95a271226f77711c7955c7b497 100644 (file)
@@ -523,6 +523,16 @@ aop_t_struct (const char *tag)
   return init_aop_type (ATK_STRUCT, 0, tag, -1);
 }
 
+const struct aop_type *
+aop_t_struct_ptr (const char *tag)
+{
+  if (tag == NULL)
+    fatal_error ("(InterAspect) Must supply a non-NULL tag when specifying a"
+                " struct type.");
+
+  return init_aop_type (ATK_STRUCT, 1, tag, -1);
+}
+
 const struct aop_type *
 aop_t_union (const char *tag)
 {
@@ -533,6 +543,16 @@ aop_t_union (const char *tag)
   return init_aop_type (ATK_UNION, 0, tag, -1);
 }
 
+const struct aop_type *
+aop_t_union_ptr (const char *tag)
+{
+  if (tag == NULL)
+    fatal_error ("(InterAspect) Must supply a non-NULL tag when specifying a"
+                " union type.");
+
+  return init_aop_type (ATK_UNION, 1, tag, -1);
+}
+
 const struct aop_type *
 aop_t_enum (const char *tag)
 {
index 15695046d2dad17dc465def379b7cfb8670a6a52..3bc065a8a032cc90b5016191955ef6a4cf7e45d8 100644 (file)
--- a/src/aop.h
+++ b/src/aop.h
@@ -181,7 +181,9 @@ extern const struct aop_type *aop_t_float32 ();
 extern const struct aop_type *aop_t_float64 ();
 extern const struct aop_type *aop_t_float128 ();
 extern const struct aop_type *aop_t_struct (const char *tag);
+extern const struct aop_type *aop_t_struct_ptr (const char *tag);
 extern const struct aop_type *aop_t_union (const char *tag);
+extern const struct aop_type *aop_t_union_ptr (const char *tag);
 extern const struct aop_type *aop_t_enum (const char *tag);
 extern const struct aop_type *aop_t_pointer_to (const struct aop_type *type);