diff --git a/include/boost/detail/shared_count.hpp b/include/boost/detail/shared_count.hpp index 0e2783c..417071c 100644 --- a/include/boost/detail/shared_count.hpp +++ b/include/boost/detail/shared_count.hpp @@ -47,7 +47,7 @@ namespace boost // Debug hooks -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_scalar_constructor_hook(void * px, std::size_t size, void * pn); void sp_array_constructor_hook(void * px); @@ -192,7 +192,7 @@ private: #endif }; -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) template void cbi_call_constructor_hook(sp_counted_base * pn, T * px, checked_deleter const &, int) { @@ -249,14 +249,14 @@ public: sp_counted_base_impl(P p, D d): ptr(p), del(d) { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) detail::cbi_call_constructor_hook(this, p, d, 0); #endif } virtual void dispose() // nothrow { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) detail::cbi_call_destructor_hook(this, ptr, del, 0); #endif del(ptr); @@ -296,7 +296,7 @@ public: #endif }; -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int const shared_count_id = 0x2C35F101; int const weak_count_id = 0x298C38A4; @@ -311,7 +311,7 @@ private: sp_counted_base * pi_; -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int id_; #endif @@ -320,14 +320,14 @@ private: public: shared_count(): pi_(0) // nothrow -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { } template shared_count(P p, D d): pi_(0) -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { @@ -362,7 +362,7 @@ public: template explicit shared_count(std::auto_ptr & r): pi_(new sp_counted_base_impl< Y *, checked_deleter >(r.get(), checked_deleter())) -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { @@ -374,13 +374,13 @@ public: ~shared_count() // nothrow { if(pi_ != 0) pi_->release(); -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) id_ = 0; #endif } shared_count(shared_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { @@ -443,7 +443,7 @@ private: sp_counted_base * pi_; -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) int id_; #endif @@ -452,14 +452,14 @@ private: public: weak_count(): pi_(0) // nothrow -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(weak_count_id) #endif { } weak_count(shared_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { @@ -467,7 +467,7 @@ public: } weak_count(weak_count const & r): pi_(r.pi_) // nothrow -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { @@ -477,7 +477,7 @@ public: ~weak_count() // nothrow { if(pi_ != 0) pi_->weak_release(); -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) id_ = 0; #endif } @@ -526,7 +526,7 @@ public: }; inline shared_count::shared_count(weak_count const & r): pi_(r.pi_) -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) , id_(shared_count_id) #endif { diff --git a/include/boost/scoped_array.hpp b/include/boost/scoped_array.hpp index d99653c..abd75ad 100644 --- a/include/boost/scoped_array.hpp +++ b/include/boost/scoped_array.hpp @@ -22,7 +22,7 @@ namespace boost // Debug hooks -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_array_constructor_hook(void * p); void sp_array_destructor_hook(void * p); @@ -50,14 +50,14 @@ public: explicit scoped_array(T * p = 0) : ptr(p) // never throws { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_constructor_hook(ptr); #endif } ~scoped_array() // never throws { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_destructor_hook(ptr); #endif boost::checked_array_delete(ptr); diff --git a/include/boost/scoped_ptr.hpp b/include/boost/scoped_ptr.hpp index 03b34ed..19396a5 100644 --- a/include/boost/scoped_ptr.hpp +++ b/include/boost/scoped_ptr.hpp @@ -24,7 +24,7 @@ namespace boost // Debug hooks -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) void sp_scalar_constructor_hook(void * p); void sp_scalar_destructor_hook(void * p); @@ -53,7 +53,7 @@ public: explicit scoped_ptr(T * p = 0): ptr(p) // never throws { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook(ptr); #endif } @@ -62,7 +62,7 @@ public: explicit scoped_ptr(std::auto_ptr p): ptr(p.release()) // never throws { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook(ptr); #endif } @@ -71,7 +71,7 @@ public: ~scoped_ptr() // never throws { -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_destructor_hook(ptr); #endif boost::checked_delete(ptr); diff --git a/src/sp_collector.cpp b/src/sp_collector.cpp index 7b96ed7..42fd16c 100644 --- a/src/sp_collector.cpp +++ b/src/sp_collector.cpp @@ -9,7 +9,7 @@ // warranty, and with no claim as to its suitability for any purpose. // -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) #include #include @@ -266,4 +266,4 @@ void sp_array_destructor_hook(void *) } // namespace boost -#endif // defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS) diff --git a/src/sp_debug_hooks.cpp b/src/sp_debug_hooks.cpp index 6ad1edc..1f6be5f 100644 --- a/src/sp_debug_hooks.cpp +++ b/src/sp_debug_hooks.cpp @@ -9,7 +9,7 @@ // warranty, and with no claim as to its suitability for any purpose. // -#if defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) #include #include @@ -241,4 +241,4 @@ void operator delete[](void * p, nothrow_t const &) throw() #endif -#endif // defined(BOOST_ENABLE_SP_DEBUG_HOOKS) +#endif // defined(BOOST_SP_ENABLE_DEBUG_HOOKS)