summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-17 16:01:16 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-03-17 16:01:16 +0000
commitba3dde4254f0ae8394b4ebaf2a13b0ef65d62f55 (patch)
tree55df7d59ae5eb7294d35655d34ddac2e3cb88d52
parentbc6f6f9adf01e35e677ba114807dd767026325cf (diff)
downloadATCD-ba3dde4254f0ae8394b4ebaf2a13b0ef65d62f55.tar.gz
ChangeLogTag: Mon Mar 17 09:51:36 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog14
-rw-r--r--TAO/TAO_IDL/ast/ast_module.cpp11
2 files changed, 24 insertions, 1 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index fc663a8fc6b..1c070470b2c 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,17 @@
+Mon Mar 17 09:51:36 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_module.cpp (fe_add_module):
+
+ Added a check for a 0 prefix (as opposed to one that is
+ an empty string) before doing a string compare. As a result
+ of the change in the entry below, it became possible for
+ this to happen when checking for previous openings of a
+ module, in order to pass along any prefix that may have
+ been applied to the previous opening. If a prefix of 0
+ is found, this now indicates that we are looking at the
+ global scope, and can break out of the checking loop
+ immediately.
+
Fri Mar 14 21:50:10 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/util/utl_global.cpp:
diff --git a/TAO/TAO_IDL/ast/ast_module.cpp b/TAO/TAO_IDL/ast/ast_module.cpp
index d6e4793476f..4338d86c69a 100644
--- a/TAO/TAO_IDL/ast/ast_module.cpp
+++ b/TAO/TAO_IDL/ast/ast_module.cpp
@@ -170,12 +170,21 @@ AST_Module::fe_add_module (AST_Module *t)
AST_Module *m = 0;
UTL_Scope *scope = t->defined_in ();
+ const char *prefix_holder = 0;
// If our prefix is empty, we check to see if an ancestor has one.
while (ACE_OS::strcmp (t->prefix (), "") == 0 && scope != 0)
{
AST_Decl *parent = ScopeAsDecl (scope);
- t->prefix (ACE_const_cast (char *, parent->prefix ()));
+ prefix_holder = parent->prefix ();
+
+ // We have reached global scope.
+ if (prefix_holder == 0)
+ {
+ break;
+ }
+
+ t->prefix (ACE_const_cast (char *, prefix_holder));
scope = parent->defined_in ();
}