summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-29 23:04:50 +0000
committerparsons <parsons@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-29 23:04:50 +0000
commit0afc6f58113347102a2a7777c74af1720e26b953 (patch)
treed90ba44f22ae3f83933a852994215559992e31c7
parent503d69cffd7b1562f0dacb9b61668809655116a1 (diff)
downloadATCD-0afc6f58113347102a2a7777c74af1720e26b953.tar.gz
ChangeLogTag: Fri Aug 29 17:52:12 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
-rw-r--r--TAO/ChangeLog_ref9
-rw-r--r--TAO/TAO_IDL/ast/ast_string.cpp28
2 files changed, 28 insertions, 9 deletions
diff --git a/TAO/ChangeLog_ref b/TAO/ChangeLog_ref
index f04f03ad371..b2022767ed0 100644
--- a/TAO/ChangeLog_ref
+++ b/TAO/ChangeLog_ref
@@ -1,3 +1,12 @@
+Fri Aug 29 17:52:12 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
+
+ * TAO_IDL/ast/ast_string.cpp:
+
+ Changed the constructor to proactively compute and store the flat
+ name for unbounded (w)strings, as it already did for bounded
+ (w)strings. This simplifies consistent generation of the ifdef
+ guards by the traits visitor.
+
Fri Aug 29 16:31:12 2003 Jeff Parsons <j.parsons@vanderbilt.edu>
* TAO_IDL/be/be_visitor_interface/interface_ch.cpp:
diff --git a/TAO/TAO_IDL/ast/ast_string.cpp b/TAO/TAO_IDL/ast/ast_string.cpp
index 62d29928034..2cb55e956dc 100644
--- a/TAO/TAO_IDL/ast/ast_string.cpp
+++ b/TAO/TAO_IDL/ast/ast_string.cpp
@@ -133,18 +133,28 @@ AST_String::AST_String (AST_Decl::NodeType nt,
unsigned long bound = ms->ev ()->u.ulval;
- if (bound > 0)
+ static char namebuf[NAMEBUFSIZE];
+ static char boundbuf[NAMEBUFSIZE];
+ ACE_OS::memset (namebuf,
+ '\0',
+ NAMEBUFSIZE);
+ ACE_OS::memset (boundbuf,
+ '\0',
+ NAMEBUFSIZE);
+
+ if (bound)
{
- static char namebuf[NAMEBUFSIZE];
- ACE_OS::memset (namebuf,
- '\0',
- NAMEBUFSIZE);
- ACE_OS::sprintf (namebuf,
- "CORBA_%sSTRING_%d",
- (wide == 1 ? "" : "W"),
+ ACE_OS::sprintf (boundbuf,
+ "_%d",
bound);
- this->flat_name_ = ACE::strnew (namebuf);
}
+
+ ACE_OS::sprintf (namebuf,
+ "CORBA_%sSTRING%s",
+ (wide == 1 ? "" : "W"),
+ boundbuf);
+
+ this->flat_name_ = ACE::strnew (namebuf);
}
AST_String::~AST_String (void)