Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r57136 - branches/release/boost/serialization
From: ramey_at_[hidden]
Date: 2009-10-24 12:18:39


Author: ramey
Date: 2009-10-24 12:18:38 EDT (Sat, 24 Oct 2009)
New Revision: 57136
URL: http://svn.boost.org/trac/boost/changeset/57136

Log:
Fixes for minor and/or obscure bugs
Properties modified:
   branches/release/boost/serialization/ (props changed)
Text files modified:
   branches/release/boost/serialization/extended_type_info.hpp | 8 --------
   branches/release/boost/serialization/extended_type_info_typeid.hpp | 2 ++
   branches/release/boost/serialization/void_cast.hpp | 23 ++++-------------------
   3 files changed, 6 insertions(+), 27 deletions(-)

Modified: branches/release/boost/serialization/extended_type_info.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info.hpp (original)
+++ branches/release/boost/serialization/extended_type_info.hpp 2009-10-24 12:18:38 EDT (Sat, 24 Oct 2009)
@@ -24,8 +24,6 @@
 #include <boost/config.hpp>
 #include <boost/noncopyable.hpp>
 #include <boost/serialization/config.hpp>
-#include <boost/shared_ptr.hpp>
-#include <boost/weak_ptr.hpp>
 #include <boost/mpl/bool.hpp>
 
 #include <boost/config/abi_prefix.hpp> // must be the last header
@@ -48,11 +46,6 @@
 {
 private:
     friend class boost::serialization::void_cast_detail::void_caster;
- boost::shared_ptr<const extended_type_info> m_this;
- boost::weak_ptr<const extended_type_info>
- get_weak_ptr() const {
- return m_this;
- }
 
     // used to uniquely identify the type of class derived from this one
     // so that different derivations of this class can be simultaneously
@@ -115,4 +108,3 @@
 #include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
 
 #endif // BOOST_SERIALIZATION_EXTENDED_TYPE_INFO_HPP
-

Modified: branches/release/boost/serialization/extended_type_info_typeid.hpp
==============================================================================
--- branches/release/boost/serialization/extended_type_info_typeid.hpp (original)
+++ branches/release/boost/serialization/extended_type_info_typeid.hpp 2009-10-24 12:18:38 EDT (Sat, 24 Oct 2009)
@@ -48,6 +48,8 @@
     public extended_type_info
 {
     virtual const char * get_debug_info() const {
+ if(static_cast<const std::type_info *>(0) == m_ti)
+ return static_cast<const char *>(0);
         return m_ti->name();
     }
 protected:

Modified: branches/release/boost/serialization/void_cast.hpp
==============================================================================
--- branches/release/boost/serialization/void_cast.hpp (original)
+++ branches/release/boost/serialization/void_cast.hpp 2009-10-24 12:18:38 EDT (Sat, 24 Oct 2009)
@@ -18,7 +18,6 @@
 // See http://www.boost.org for updates, documentation, and revision history.
 
 #include <cstddef> // for ptrdiff_t
-#include <boost/weak_ptr.hpp>
 #include <boost/noncopyable.hpp>
 
 #include <boost/serialization/config.hpp>
@@ -28,6 +27,7 @@
 #include <boost/serialization/type_info_implementation.hpp>
 #include <boost/serialization/extended_type_info.hpp>
 #include <boost/type_traits/is_virtual_base_of.hpp>
+#include <boost/serialization/void_cast_fwd.hpp>
 
 #include <boost/config/abi_prefix.hpp> // must be the last header
 
@@ -112,10 +112,8 @@
     // Data members
     const extended_type_info * m_derived;
     const extended_type_info * m_base;
- boost::weak_ptr<const extended_type_info> m_derived_observer;
- boost::weak_ptr<const extended_type_info> m_base_observer;
     /*const*/ std::ptrdiff_t m_difference;
- const bool m_heap; // allocated on the heap
+ void_caster const * const m_parent;
 
     // note that void_casters are keyed on value of
     // member extended type info records - NOT their
@@ -135,14 +133,12 @@
         extended_type_info const * derived,
         extended_type_info const * base,
         std::ptrdiff_t difference = 0,
- bool heap = false
+ void_caster const * const parent = 0
     ) :
         m_derived(derived),
         m_base(base),
- m_derived_observer(derived->get_weak_ptr()),
- m_base_observer(base->get_weak_ptr()),
         m_difference(difference),
- m_heap(heap)
+ m_parent(parent)
     {}
     virtual ~void_caster(){}
 };
@@ -248,17 +244,6 @@
 
 } // void_cast_detail
 
-// Register a base/derived pair. This indicates that it is possible
-// to upcast a void pointer from Derived to Base and downcast a
-// void pointer from Base to Derived. Note bogus arguments to workaround
-// bug in msvc 6.0
-template<class Derived, class Base>
-BOOST_DLLEXPORT
-inline const void_cast_detail::void_caster & void_cast_register(
- const Derived * dnull,
- const Base * bnull
-) BOOST_USED;
-
 template<class Derived, class Base>
 BOOST_DLLEXPORT
 inline const void_cast_detail::void_caster & void_cast_register(


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk