diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-02-23 09:02:07 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2006-02-23 09:02:07 +0000 |
commit | 802f100322b0e8efb2ae1e980896907aa4ab4009 (patch) | |
tree | 9306097df58f2b9ce9a9d6bac99532050e3febb6 | |
parent | 11b90a62c0d55498bfac902c215b97c0198e0557 (diff) | |
download | ATCD-802f100322b0e8efb2ae1e980896907aa4ab4009.tar.gz |
ChangelogTag: Tue Feb 21 20:20:12 UTC 2006 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r-- | ace/Signal.h | 6 | ||||
-rw-r--r-- | ace/Svc_Handler.cpp | 7 | ||||
-rw-r--r-- | ace/TP_Reactor.h | 2 | ||||
-rw-r--r-- | ace/Time_Value.cpp | 2 | ||||
-rw-r--r-- | tests/DLL_Test_Impl.cpp | 12 | ||||
-rw-r--r-- | tests/DLL_Test_Impl.h | 3 |
6 files changed, 22 insertions, 10 deletions
diff --git a/ace/Signal.h b/ace/Signal.h index 12c61562e2d..45bddf2c22f 100644 --- a/ace/Signal.h +++ b/ace/Signal.h @@ -267,7 +267,7 @@ private: * global/static variables and functions. * * Using this class a program can register an ACE_Event_Handler - * with the <ACE_Sig_Handler> in order to handle a designated + * with the ACE_Sig_Handler in order to handle a designated * <signum>. When a signal occurs that corresponds to this * <signum>, the <handle_signal> method of the registered * ACE_Event_Handler is invoked automatically. @@ -314,7 +314,7 @@ public: // = Set/get the handler associated with a particular signal. - /// Return the <ACE_Sig_Handler> associated with <signum>. + /// Return the ACE_Sig_Handler associated with <signum>. virtual ACE_Event_Handler *handler (int signum); /// Set a new ACE_Event_Handler that is associated with <signum>. @@ -469,7 +469,7 @@ public: // = Set/get the handler associated with a particular signal. - /// Return the head of the list of <ACE_Sig_Handler>s associated with + /// Return the head of the list of ACE_Sig_Handlers associated with /// SIGNUM. virtual ACE_Event_Handler *handler (int signum); diff --git a/ace/Svc_Handler.cpp b/ace/Svc_Handler.cpp index d228f472533..5070d4d931d 100644 --- a/ace/Svc_Handler.cpp +++ b/ace/Svc_Handler.cpp @@ -95,11 +95,11 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator new (size_t n, #if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE) template <PR_ST_1, ACE_SYNCH_DECL> void ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator delete (void *p, - const ACE_nothrow_t&) throw() + const ACE_nothrow_t&) throw() { ACE_TRACE ("ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator delete(nothrow)"); - ::delete (p); + ::delete [] static_cast <char *> (obj); } #endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */ @@ -127,8 +127,7 @@ ACE_Svc_Handler<PR_ST_2, ACE_SYNCH_USE>::operator delete (void *obj) // You cannot delete a 'void*' (X3J16/95-0087 5.3.5.3), but we know // the pointer was created using new char[] (see operator new code), // so we use a cast: - char *tmp = (char *) obj; - ::delete [] tmp; + ::delete [] static_cast <char *> (obj); } // Default constructor. diff --git a/ace/TP_Reactor.h b/ace/TP_Reactor.h index 3dbbb220027..fcb8db09a1e 100644 --- a/ace/TP_Reactor.h +++ b/ace/TP_Reactor.h @@ -289,7 +289,7 @@ public: virtual int owner (ACE_thread_t n_id, ACE_thread_t *o_id = 0); /// Return the current owner of the thread. - virtual int owner (ACE_thread_t *); + virtual int owner (ACE_thread_t *t_id); /// Declare the dynamic allocation hooks. ACE_ALLOC_HOOK_DECLARE; diff --git a/ace/Time_Value.cpp b/ace/Time_Value.cpp index 10d49706c59..1d1988b9673 100644 --- a/ace/Time_Value.cpp +++ b/ace/Time_Value.cpp @@ -253,7 +253,7 @@ ACE_Time_Value::operator *= (double d) time_total -= time_sec; time_total *= ACE_ONE_SECOND_IN_USECS; - long time_usec = static_cast<long> (time_total); + suseconds_t time_usec = static_cast<suseconds_t> (time_total); // round up the result to save the last usec if (time_usec > 0 && (time_total - time_usec) >= 0.5) diff --git a/tests/DLL_Test_Impl.cpp b/tests/DLL_Test_Impl.cpp index 87ed155dcc9..fbd6d8a3321 100644 --- a/tests/DLL_Test_Impl.cpp +++ b/tests/DLL_Test_Impl.cpp @@ -70,6 +70,16 @@ Hello_Impl::operator new (size_t bytes, const ACE_nothrow_t &nt) ACE_DEBUG ((LM_INFO, "Hello_Impl::new\n")); return ::new (nt) char[bytes]; } + +#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE) +void +Hello_Impl::operator delete (void *ptr, const ACE_nothrow_t&) +{ + ACE_DEBUG ((LM_INFO, "Hello_Impl::delete\n")); + ::delete [] static_cast<char *> (ptr); +} +#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */ + #endif /* ACE_HAS_NEW_NOTHROW */ void @@ -133,5 +143,5 @@ dynamic_cast_test (Parent *target) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("dynamic_cast_test: parent %@; child %@\n"), target, c)); return target == c ? 0 : -1; -} +} #endif /* !ACE_LACKS_RTTI */ diff --git a/tests/DLL_Test_Impl.h b/tests/DLL_Test_Impl.h index bf16bdd5c48..9ef3fb887a8 100644 --- a/tests/DLL_Test_Impl.h +++ b/tests/DLL_Test_Impl.h @@ -56,6 +56,9 @@ public: #if defined (ACE_HAS_NEW_NOTHROW) /// Overloaded new operator, nothrow_t variant. void *operator new (size_t bytes, const ACE_nothrow_t &nt); +#if !defined (ACE_LACKS_PLACEMENT_OPERATOR_DELETE) + void operator delete (void *p, const ACE_nothrow_t&) throw (); +#endif /* ACE_LACKS_PLACEMENT_OPERATOR_DELETE */ #endif /* ACE_HAS_NEW_NOTHROW */ void operator delete (void *ptr); |