]> git.lyx.org Git - lyx.git/blobdiff - 3rdparty/boost/boost/smart_ptr/detail/sp_counted_base_pt.hpp
Update to boost 1.72
[lyx.git] / 3rdparty / boost / boost / smart_ptr / detail / sp_counted_base_pt.hpp
index 85f2563d5d5a362e0a6f2cd299c0670b184db63a..ec850fe6bdc8ea2b47327b36a93c8cd19b3de53d 100644 (file)
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
-#include <boost/detail/sp_typeinfo.hpp>
+#include <boost/smart_ptr/detail/sp_typeinfo_.hpp>
 #include <boost/assert.hpp>
+#include <boost/config.hpp>
+#include <boost/cstdint.hpp>
 #include <pthread.h>
 
 namespace boost
@@ -28,15 +30,15 @@ namespace boost
 namespace detail
 {
 
-class sp_counted_base
+class BOOST_SYMBOL_VISIBLE sp_counted_base
 {
 private:
 
     sp_counted_base( sp_counted_base const & );
     sp_counted_base & operator= ( sp_counted_base const & );
 
-    long use_count_;        // #shared
-    long weak_count_;       // #weak + (#shared != 0)
+    boost::int_least32_t use_count_;        // #shared
+    boost::int_least32_t weak_count_;       // #weak + (#shared != 0)
 
     mutable pthread_mutex_t m_;
 
@@ -70,8 +72,8 @@ public:
         delete this;
     }
 
-    virtual void * get_deleter( sp_typeinfo const & ti ) = 0;
-    virtual void * get_local_deleter( sp_typeinfo const & ti ) = 0;
+    virtual void * get_deleter( sp_typeinfo_ const & ti ) = 0;
+    virtual void * get_local_deleter( sp_typeinfo_ const & ti ) = 0;
     virtual void * get_untyped_deleter() = 0;
 
     void add_ref_copy()
@@ -92,7 +94,7 @@ public:
     void release() // nothrow
     {
         BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
-        long new_use_count = --use_count_;
+        boost::int_least32_t new_use_count = --use_count_;
         BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
 
         if( new_use_count == 0 )
@@ -112,7 +114,7 @@ public:
     void weak_release() // nothrow
     {
         BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
-        long new_weak_count = --weak_count_;
+        boost::int_least32_t new_weak_count = --weak_count_;
         BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
 
         if( new_weak_count == 0 )
@@ -124,7 +126,7 @@ public:
     long use_count() const // nothrow
     {
         BOOST_VERIFY( pthread_mutex_lock( &m_ ) == 0 );
-        long r = use_count_;
+        boost::int_least32_t r = use_count_;
         BOOST_VERIFY( pthread_mutex_unlock( &m_ ) == 0 );
 
         return r;