summaryrefslogtreecommitdiff
path: root/TAO/TAO_IDL/util/utl_global.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'TAO/TAO_IDL/util/utl_global.cpp')
-rw-r--r--TAO/TAO_IDL/util/utl_global.cpp17
1 files changed, 14 insertions, 3 deletions
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp
index f5dbbcb5be8..3cf140f859f 100644
--- a/TAO/TAO_IDL/util/utl_global.cpp
+++ b/TAO/TAO_IDL/util/utl_global.cpp
@@ -477,9 +477,6 @@ IDL_GlobalData::store_include_file_name (UTL_String *n)
return;
}
- // If it's a new filename, we need to push an empty prefix.
- idl_global->pragma_prefixes ().push (ACE::strnew (""));
-
// OK, need to store. Make sure there's space for one more string
if (this->pd_n_include_file_names == this->pd_n_alloced_file_names)
{
@@ -914,6 +911,20 @@ IDL_GlobalData::pragma_prefixes (void)
return this->pragma_prefixes_;
}
+void
+IDL_GlobalData::update_prefix (char *filename)
+{
+ ACE_CString tmp ("", 0, 0);
+ ACE_CString fn (filename, 0, 0);
+ int result =
+ this->file_prefixes_.trybind (fn, tmp);
+ char *trash = 0;
+ this->pragma_prefixes_.pop (trash);
+ delete [] trash;
+ this->pragma_prefixes_.push (tmp.rep ());
+ this->pd_root->prefix ((char *) tmp.fast_rep ());
+}
+
UTL_ScopedName *
IDL_GlobalData::string_to_scoped_name (char *s)
{