summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-28 20:29:31 +0000
committerlevine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1998-05-28 20:29:31 +0000
commita51719aa89b8aa808814a139cabc1a751813f762 (patch)
tree41355ffc01e44347d0ab5f1d3808dee7f99ede49
parent820052bd8e33b262a8b30cc7fd39c8ce83231d19 (diff)
downloadATCD-a51719aa89b8aa808814a139cabc1a751813f762.tar.gz
added ACE_DES_FREE_TEMPLATE2 macro to handle template classes with two arguments
-rw-r--r--ace/Hash_Map_Manager.cpp12
-rw-r--r--ace/Map_Manager.cpp4
-rw-r--r--ace/OS.h5
3 files changed, 13 insertions, 8 deletions
diff --git a/ace/Hash_Map_Manager.cpp b/ace/Hash_Map_Manager.cpp
index aa0d266d0d2..6f1b8abce17 100644
--- a/ace/Hash_Map_Manager.cpp
+++ b/ace/Hash_Map_Manager.cpp
@@ -154,16 +154,16 @@ ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::close_i (void)
temp_ptr = temp_ptr->next_;
// Explicitly call the destructor.
- ACE_DES_FREE_TEMPLATE (hold_ptr, this->allocator_->free,
- ACE_Hash_Map_Entry, (<EXT_ID, INT_ID>));
+ ACE_DES_FREE_TEMPLATE2 (hold_ptr, this->allocator_->free,
+ ACE_Hash_Map_Entry, EXT_ID, INT_ID);
}
// Destroy the dummy entry.
ACE_Hash_Map_Entry<EXT_ID, INT_ID> *entry = &table_[i];
// The "if" second argument results in a no-op instead of
// deallocation.
- ACE_DES_FREE_TEMPLATE (entry, if,
- ACE_Hash_Map_Entry, (<EXT_ID, INT_ID>));
+ ACE_DES_FREE_TEMPLATE2 (entry, if,
+ ACE_Hash_Map_Entry, EXT_ID, INT_ID);
}
// Free table memory.
@@ -359,8 +359,8 @@ ACE_Hash_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::unbind_i (ACE_Hash_Map_Entry<EXT
entry->prev_->next_ = entry->next_;
// Explicitly call the destructor.
- ACE_DES_FREE_TEMPLATE (entry, this->allocator_->free,
- ACE_Hash_Map_Entry, (<EXT_ID, INT_ID>));
+ ACE_DES_FREE_TEMPLATE2 (entry, this->allocator_->free,
+ ACE_Hash_Map_Entry, EXT_ID, INT_ID);
this->cur_size_--;
return 0;
}
diff --git a/ace/Map_Manager.cpp b/ace/Map_Manager.cpp
index c27da1e52f4..4d6d8fbe81d 100644
--- a/ace/Map_Manager.cpp
+++ b/ace/Map_Manager.cpp
@@ -177,8 +177,8 @@ ACE_Map_Manager<EXT_ID, INT_ID, ACE_LOCK>::free_search_structure (void)
ACE_Map_Entry<EXT_ID, INT_ID> *ss = &this->search_structure_[i];
// The "if" second argument results in a no-op instead of
// deallocation.
- ACE_DES_FREE_TEMPLATE (ss, if,
- ACE_Map_Entry, (<EXT_ID, INT_ID>));
+ ACE_DES_FREE_TEMPLATE2 (ss, if,
+ ACE_Map_Entry, EXT_ID, INT_ID);
}
// Actually free the memory.
diff --git a/ace/OS.h b/ace/OS.h
index d7f53424b33..f54271335de 100644
--- a/ace/OS.h
+++ b/ace/OS.h
@@ -5382,11 +5382,16 @@ private:
POINTER-> T_CLASS T_PARAMETER ::~ T_CLASS ()
#if defined (__Lynx__)
#define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER)
+#define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2)
#else
#define ACE_DES_FREE_TEMPLATE(POINTER,DEALLOCATOR,T_CLASS,T_PARAMETER) \
do { POINTER-> T_CLASS T_PARAMETER ::~ T_CLASS (); \
DEALLOCATOR (POINTER); \
} while (0)
+#define ACE_DES_FREE_TEMPLATE2(POINTER,DEALLOCATOR,T_CLASS,T_PARAM1,T_PARAM2) \
+ do { POINTER-> T_CLASS <T_PARAM1, T_PARAM2> ::~ T_CLASS (); \
+ DEALLOCATOR (POINTER); \
+ } while (0)
#endif
#if defined (ACE_HAS_SIGNAL_SAFE_OS_CALLS)