diff options
Diffstat (limited to 'ace/Cleanup.cpp')
-rw-r--r-- | ace/Cleanup.cpp | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/ace/Cleanup.cpp b/ace/Cleanup.cpp index 9e51dd6cf70..a2b67825e72 100644 --- a/ace/Cleanup.cpp +++ b/ace/Cleanup.cpp @@ -1,9 +1,10 @@ -// -*- C++ -*- // $Id$ #include "ace/Cleanup.h" -ACE_RCSID(ace, Cleanup, "$Id$") +ACE_RCSID (ace, + Cleanup, + "$Id$") #if !defined (ACE_HAS_INLINED_OSCALLS) # include "ace/Cleanup.inl" @@ -11,6 +12,8 @@ ACE_RCSID(ace, Cleanup, "$Id$") #include "ace/OS_Memory.h" +ACE_BEGIN_VERSIONED_NAMESPACE_DECL + void ACE_Cleanup::cleanup (void *) { @@ -25,7 +28,7 @@ ACE_Cleanup::~ACE_Cleanup (void) /*****************************************************************************/ extern "C" void -ace_cleanup_destroyer (ACE_Cleanup *object, void *param) +ACE_CLEANUP_DESTROYER_NAME (ACE_Cleanup *object, void *param) { object->cleanup (param); } @@ -98,7 +101,7 @@ ACE_Cleanup_Info_Node::~ACE_Cleanup_Info_Node (void) ACE_Cleanup_Info_Node * ACE_Cleanup_Info_Node::insert (const ACE_Cleanup_Info &new_info) { - ACE_Cleanup_Info_Node *new_node; + ACE_Cleanup_Info_Node *new_node = 0; ACE_NEW_RETURN (new_node, ACE_Cleanup_Info_Node (new_info, this), @@ -133,7 +136,7 @@ ACE_OS_Exit_Info::at_exit_i (void *object, // Return -1 and sets errno if unable to allocate storage. Enqueue // at the head and dequeue from the head to get LIFO ordering. - ACE_Cleanup_Info_Node *new_node; + ACE_Cleanup_Info_Node *new_node = 0; if ((new_node = registered_objects_->insert (new_info)) == 0) return -1; @@ -163,7 +166,7 @@ ACE_OS_Exit_Info::find (void *object) } void -ACE_OS_Exit_Info::call_hooks () +ACE_OS_Exit_Info::call_hooks (void) { // Call all registered cleanup hooks, in reverse order of // registration. @@ -172,10 +175,12 @@ ACE_OS_Exit_Info::call_hooks () iter = iter->next_) { ACE_Cleanup_Info &info = iter->cleanup_info_; - if (info.cleanup_hook_ == reinterpret_cast<ACE_CLEANUP_FUNC> (ace_cleanup_destroyer)) + if (info.cleanup_hook_ == reinterpret_cast<ACE_CLEANUP_FUNC> ( + ACE_CLEANUP_DESTROYER_NAME)) // The object is an ACE_Cleanup. - ace_cleanup_destroyer (reinterpret_cast<ACE_Cleanup *> (info.object_), - info.param_); + ACE_CLEANUP_DESTROYER_NAME ( + reinterpret_cast<ACE_Cleanup *> (info.object_), + info.param_); else if (info.object_ == &ace_exit_hook_marker) // The hook is an ACE_EXIT_HOOK. (* reinterpret_cast<ACE_EXIT_HOOK> (info.cleanup_hook_)) (); @@ -183,3 +188,5 @@ ACE_OS_Exit_Info::call_hooks () (*info.cleanup_hook_) (info.object_, info.param_); } } + +ACE_END_VERSIONED_NAMESPACE_DECL |