support for a class of circular references
git-svn-id: https://asn1c.svn.sourceforge.net/svnroot/asn1c/trunk@749 59561ff5-6e30-0410-9f3c-9617f08c8826
diff --git a/tests/31-set-of-OK.asn1.-P b/tests/31-set-of-OK.asn1.-P
index 2bd3b12..b1bdd78 100644
--- a/tests/31-set-of-OK.asn1.-P
+++ b/tests/31-set-of-OK.asn1.-P
@@ -1,24 +1,30 @@
/*** <<< INCLUDES [Forest] >>> ***/
-#include <Tree.h>
#include <asn_SET_OF.h>
#include <constr_SET_OF.h>
-/*** <<< DEPS [Forest] >>> ***/
+/*** <<< FWD-DECLS [Forest] >>> ***/
-extern asn_TYPE_descriptor_t asn_DEF_Forest;
+struct Tree; /* Forward declaration */
/*** <<< TYPE-DECLS [Forest] >>> ***/
-
typedef struct Forest {
- A_SET_OF(Tree_t) list;
+ A_SET_OF(struct Tree) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
} Forest_t;
+/*** <<< FUNC-DECLS [Forest] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Forest;
+
+/*** <<< POST-INCLUDE [Forest] >>> ***/
+
+#include <Tree.h>
+
/*** <<< STAT-DEFS [Forest] >>> ***/
static asn_TYPE_member_t asn_MBR_Forest_1[] = {
@@ -66,13 +72,8 @@
#include <INTEGER.h>
#include <constr_SEQUENCE.h>
-/*** <<< DEPS [Tree] >>> ***/
-
-extern asn_TYPE_descriptor_t asn_DEF_Tree;
-
/*** <<< TYPE-DECLS [Tree] >>> ***/
-
typedef struct Tree {
INTEGER_t height;
INTEGER_t width;
@@ -81,6 +82,10 @@
asn_struct_ctx_t _asn_ctx;
} Tree_t;
+/*** <<< FUNC-DECLS [Tree] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Tree;
+
/*** <<< STAT-DEFS [Tree] >>> ***/
static asn_TYPE_member_t asn_MBR_Tree_1[] = {
@@ -139,7 +144,6 @@
/*** <<< INCLUDES [Stuff] >>> ***/
-#include <Forest.h>
#include <asn_SET_OF.h>
#include <constr_SET_OF.h>
#include <BIT_STRING.h>
@@ -164,14 +168,16 @@
other_PR_a,
other_PR_b,
} other_PR;
-extern asn_TYPE_descriptor_t asn_DEF_Stuff;
+
+/*** <<< FWD-DECLS [Stuff] >>> ***/
+
+struct Forest; /* Forward declaration */
/*** <<< TYPE-DECLS [Stuff] >>> ***/
-
typedef struct Stuff {
struct trees {
- A_SET_OF(Forest_t) list;
+ A_SET_OF(struct Forest) list;
/* Context for parsing across buffer boundaries */
asn_struct_ctx_t _asn_ctx;
@@ -214,6 +220,14 @@
asn_struct_ctx_t _asn_ctx;
} Stuff_t;
+/*** <<< FUNC-DECLS [Stuff] >>> ***/
+
+extern asn_TYPE_descriptor_t asn_DEF_Stuff;
+
+/*** <<< POST-INCLUDE [Stuff] >>> ***/
+
+#include <Forest.h>
+
/*** <<< STAT-DEFS [Stuff] >>> ***/
static asn_TYPE_member_t asn_MBR_trees_2[] = {