diff options
Diffstat (limited to 'TAO/TAO_IDL/ast/ast_recursive.cpp')
-rw-r--r-- | TAO/TAO_IDL/ast/ast_recursive.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/TAO/TAO_IDL/ast/ast_recursive.cpp b/TAO/TAO_IDL/ast/ast_recursive.cpp index 1603b184a0b..d95c3cc6cd4 100644 --- a/TAO/TAO_IDL/ast/ast_recursive.cpp +++ b/TAO/TAO_IDL/ast/ast_recursive.cpp @@ -84,11 +84,11 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #include "global_extern.h" #include "nr_extern.h" -ACE_RCSID (ast, - ast_recursive, +ACE_RCSID (ast, + ast_recursive, "$Id$") -bool +idl_bool AST_illegal_interface_recursion (AST_Decl *t) { // Can't be 0 since we know we have an interface or valuetype. @@ -100,34 +100,34 @@ AST_illegal_interface_recursion (AST_Decl *t) i.next ()) { d = ScopeAsDecl (i.item ()); - + // Exceptions cannot be recursive, but may contain a reference // to the interface they are defined in. if (d->node_type () == AST_Decl::NT_except) { - return false; + return I_FALSE; } - + if (d == t) { - return true; + return I_TRUE; } } - return false; + return I_FALSE; } -bool +idl_bool AST_illegal_recursive_type (AST_Decl *t) { if (t == 0) { - return false; + return I_FALSE; } - + AST_Decl::NodeType nt; AST_Type *ut = AST_Type::narrow_from_decl (t); - + if (ut != 0) { ut = ut->unaliased_type (); @@ -137,7 +137,7 @@ AST_illegal_recursive_type (AST_Decl *t) { nt = t->node_type (); } - + if (nt == AST_Decl::NT_interface) { // Check for interface->struct/union->....->interface nesting. @@ -146,37 +146,37 @@ AST_illegal_recursive_type (AST_Decl *t) else if (nt != AST_Decl::NT_struct && nt != AST_Decl::NT_union) { // Structs and unions fall through to the check below. - return false; // NOT ILLEGAL. + return I_FALSE; // NOT ILLEGAL. } - bool check_for_struct = false; - bool check_for_union = false; - AST_Structure *st1 = 0; - AST_Union *un1 = 0; + idl_bool check_for_struct = I_FALSE; + idl_bool check_for_union = I_FALSE; + AST_Structure *st1 = 0; + AST_Union *un1 = 0; // Narrow the type appropriately so comparison will work. if (t->node_type () == AST_Decl::NT_struct) { - check_for_struct = true; + check_for_struct = I_TRUE; st1 = AST_Structure::narrow_from_decl (t); if (st1 == 0) { - return false; // NOT ILLEGAL. + return I_FALSE; // NOT ILLEGAL. } } else if (t->node_type () == AST_Decl::NT_union) { - check_for_union = true; + check_for_union = I_TRUE; un1 = AST_Union::narrow_from_decl (t); if (un1 == 0) { - return false; // NOT ILLEGAL. + return I_FALSE; // NOT ILLEGAL. } } - UTL_Scope *s = 0; + UTL_Scope *s = 0; AST_Structure *st2 = 0; AST_Union *un2 = 0; @@ -191,33 +191,33 @@ AST_illegal_recursive_type (AST_Decl *t) // a sequence, where recursive types may be used. if (s == 0) { - return false; // NOT ILLEGAL. + return I_FALSE; // NOT ILLEGAL. } // OK, must check this scope. if (s->scope_node_type () == AST_Decl::NT_struct - && check_for_struct == true) + && check_for_struct == I_TRUE) { st2 = AST_Structure::narrow_from_scope (s); if (st2 != 0 && st2 == st1) { - return true; // ILLEGAL RECURSIVE TYPE USE. + return I_TRUE; // ILLEGAL RECURSIVE TYPE USE. } } else if (s->scope_node_type () == AST_Decl::NT_union - && check_for_union == true) + && check_for_union == I_TRUE) { un2 = AST_Union::narrow_from_scope (s); if (un2 != 0 && un2 == un1) { - return true; // ILLEGAL RECURSIVE TYPE USE. + return I_TRUE; // ILLEGAL RECURSIVE TYPE USE. } } } // No more scopes to check. This type was used legally. - return false; // NOT ILLEGAL. + return I_FALSE; // NOT ILLEGAL. } |