revert 11442 until I find a fix for boost 1.37
authoreb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 15 Jul 2009 02:47:58 +0000 (02:47 +0000)
committereb <eb@221aa14e-8319-0410-a670-987f0aec2ac5>
Wed, 15 Jul 2009 02:47:58 +0000 (02:47 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11445 221aa14e-8319-0410-a670-987f0aec2ac5

pmt/src/lib/pmt.cc
pmt/src/lib/pmt.h
pmt/src/lib/pmt_int.h

index 315ff1a406638de950f9e82fa929d42884982f6f..b403c2327911166d2c862347ff6448b76a2b693a 100644 (file)
@@ -54,8 +54,6 @@ pmt_base::operator delete(void *p, size_t size)
 
 #endif
 
-void intrusive_ptr_add_ref(pmt_base* p) { ++(p->count_); }
-void intrusive_ptr_release(pmt_base* p) { if (--(p->count_) == 0 ) delete p; }
 
 pmt_base::~pmt_base()
 {
index d495b17a543cb97b06757a07f5ac545aa739df59..24963fee71be791b93f44872f03802c7325f8334 100644 (file)
@@ -23,7 +23,7 @@
 #ifndef INCLUDED_PMT_H
 #define INCLUDED_PMT_H
 
-#include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
 #include <boost/any.hpp>
 #include <complex>
 #include <string>
@@ -48,10 +48,8 @@ class pmt_base;
  * \brief typedef for shared pointer (transparent reference counting).
  * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
  */
-typedef boost::intrusive_ptr<pmt_base> pmt_t;
+typedef boost::shared_ptr<pmt_base> pmt_t;
 
-extern void intrusive_ptr_add_ref(pmt_base*);
-extern void intrusive_ptr_release(pmt_base*);
 
 class pmt_exception : public std::logic_error
 {
index af22d4515910de3eb449244822f0e86f249fcabf..a973d30d9ebb0366cccdedca4f67db58b7a44bd6 100644 (file)
 #define PMT_LOCAL_ALLOCATOR 0          // define to 0 or 1
 
 class pmt_base : boost::noncopyable {
-  mutable boost::detail::atomic_count count_;
-
 protected:
-  pmt_base() : count_(0) {};
+  pmt_base(){};
   virtual ~pmt_base();
 
 public:
@@ -67,9 +65,6 @@ public:
   virtual bool is_c32vector() const { return false; }
   virtual bool is_c64vector() const { return false; }
 
-  friend void intrusive_ptr_add_ref(pmt_base* p);
-  friend void intrusive_ptr_release(pmt_base* p);
-
 # if (PMT_LOCAL_ALLOCATOR)
   void *operator new(size_t);
   void operator delete(void *, size_t);