diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-12-31 21:00:15 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1997-12-31 21:00:15 +0000 |
commit | 71760c6b6194fae36fba2c18b3213c120b65db1c (patch) | |
tree | d55bfc68aa06e4ba8072bd7a8d9cc2092a68a660 | |
parent | 8943998a0cdfac78f9a6eeafa0c469b20ecb655a (diff) | |
download | ATCD-71760c6b6194fae36fba2c18b3213c120b65db1c.tar.gz |
*** empty log message ***
-rw-r--r-- | ChangeLog-98a | 8 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.cpp | 30 | ||||
-rw-r--r-- | ace/Local_Name_Space_T.h | 7 | ||||
-rw-r--r-- | ace/Obstack.cpp | 7 |
4 files changed, 31 insertions, 21 deletions
diff --git a/ChangeLog-98a b/ChangeLog-98a index fc9c1f8c173..c87f1f64fb1 100644 --- a/ChangeLog-98a +++ b/ChangeLog-98a @@ -1,3 +1,11 @@ +Wed Dec 31 14:56:06 1997 Douglas C. Schmidt <schmidt@flamenco.cs.wustl.edu> + + * ace/Obstack.cpp: Fixed a stupid bug in the ACE_Obstack + constructor. Thanks to David Levine for reporting this. + + * ace/Local_Name_Space_T.h: Updated the documentation for class + ACE_Name_Space_Map to make it more clear. + Tue Dec 30 22:07:44 1997 David L. Levine <levine@cs.wustl.edu> * ace/High_Res_Timer.cpp (elapsed_time): added a cast in diff --git a/ace/Local_Name_Space_T.cpp b/ace/Local_Name_Space_T.cpp index 2ae06e4a64d..2b7a6850d49 100644 --- a/ace/Local_Name_Space_T.cpp +++ b/ace/Local_Name_Space_T.cpp @@ -16,7 +16,7 @@ ACE_Name_Space_Map<ALLOCATOR>::ACE_Name_Space_Map (ALLOCATOR *alloc) } template <class ALLOCATOR> int -ACE_Name_Space_Map<ALLOCATOR>::close (ALLOCATOR* alloc) +ACE_Name_Space_Map<ALLOCATOR>::close (ALLOCATOR *alloc) { ACE_TRACE ("ACE_Name_Space_Map::close"); @@ -233,8 +233,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::unbind_i (const ACE_WString &nam template <ACE_MEM_POOL_1, class ACE_LOCK> int ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::bind (const ACE_WString &name, - const ACE_WString &value, - const char *type) + const ACE_WString &value, + const char *type) { ACE_TRACE ("ACE_Local_Name_Space::bind"); ACE_WRITE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1); @@ -244,8 +244,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::bind (const ACE_WString &name, template <ACE_MEM_POOL_1, class ACE_LOCK> int ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::rebind (const ACE_WString &name, - const ACE_WString &value, - const char *type) + const ACE_WString &value, + const char *type) { ACE_TRACE ("ACE_Local_Name_Space::rebind"); ACE_WRITE_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1); @@ -255,8 +255,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::rebind (const ACE_WString &name, template <ACE_MEM_POOL_1, class ACE_LOCK> int ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve (const ACE_WString &name, - ACE_WString &value, - char *&type) + ACE_WString &value, + char *&type) { // Note that we *must* use structured exception handling here // because (1) we may need to commit virtual memory pages and (2) @@ -275,8 +275,8 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve (const ACE_WString &name template <ACE_MEM_POOL_1, class ACE_LOCK> int ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve_i (const ACE_WString &name, - ACE_WString &value, - char *&type) + ACE_WString &value, + char *&type) { ACE_TRACE ("ACE_Local_Name_Space::resolve"); ACE_READ_GUARD_RETURN (ACE_RW_Process_Mutex, ace_mon, *this->lock_, -1); @@ -285,7 +285,9 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve_i (const ACE_WString &na ACE_NS_Internal ns_internal; ACE_NS_String nbc_string; // Note the classy variable name! :) - if (this->name_space_map_->find (ns_name, ns_internal, this->allocator_) != 0) + if (this->name_space_map_->find (ns_name, + ns_internal, + this->allocator_) != 0) return -1; else { @@ -295,11 +297,13 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::resolve_i (const ACE_WString &na nbc_string = ns_internal.value (); value = nbc_string; - // Gets type and then the actual reprsentation which is a ACE_USHORT16 + // Gets type and then the actual reprsentation which is a + // ACE_USHORT16 const char *temp = ns_internal.type (); size_t len = ACE_OS::strlen (ns_internal.type ()); - // Makes a copy here. Caller needs to call delete to free up memory + // Makes a copy here. Caller needs to call delete to free up + // memory. char *new_type; ACE_NEW_RETURN (new_type, char [len + 1], -1); @@ -330,7 +334,7 @@ ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Local_Name_Space (void) template <ACE_MEM_POOL_1, class ACE_LOCK> ACE_Local_Name_Space<ACE_MEM_POOL_2, ACE_LOCK>::ACE_Local_Name_Space (ACE_Naming_Context::Context_Scope_Type scope_in, - ACE_Name_Options *name_options) + ACE_Name_Options *name_options) : name_options_ (name_options) { ACE_TRACE ("ACE_Local_Name_Space::ACE_Local_Name_Space"); diff --git a/ace/Local_Name_Space_T.h b/ace/Local_Name_Space_T.h index 9d65682f3b1..1c1e437ff83 100644 --- a/ace/Local_Name_Space_T.h +++ b/ace/Local_Name_Space_T.h @@ -50,12 +50,11 @@ class ACE_Name_Space_Map : public MAP_MANAGER // that accesses or updates the Map Manager. // // = DESCRIPTION - // We need this class because otherwise the SHARED_MALLOC + // We need this class because otherwise the ALLOCATOR // pointer will be stored in the Map_Manager that resides within // shared memory. Naturally, this will cause horrible problems // since only the first process to set that pointer will be - // guaranteed the address of the SHARED_MALLOC allocator is - // meaningful! + // guaranteed the address of the ALLOCATOR is meaningful! public: ACE_Name_Space_Map (ALLOCATOR *alloc); // Constructor. @@ -83,8 +82,6 @@ public: ALLOCATOR *alloc); int close (ALLOCATOR *alloc); - -private: }; template <ACE_MEM_POOL_1, class ACE_LOCK> diff --git a/ace/Obstack.cpp b/ace/Obstack.cpp index 7ad85ee68aa..23cafb42d08 100644 --- a/ace/Obstack.cpp +++ b/ace/Obstack.cpp @@ -54,15 +54,16 @@ ACE_Obstack::new_chunk (void) ACE_Obstack::ACE_Obstack (size_t size, ACE_Allocator *allocator_strategy) : allocator_strategy_ (allocator_strategy), - size_ (size), - head_ (this->new_chunk ()), - curr_ (head_) + size_ (size) { ACE_TRACE ("ACE_Obstack::ACE_Obstack"); if (this->allocator_strategy_ == 0) ACE_ALLOCATOR (this->allocator_strategy_, ACE_Allocator::instance ()); + + this->head_ = this->new_chunk (); + this->curr_ = this->head_; } ACE_Obstack::~ACE_Obstack (void) |