projects
/
ardour.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
057d0b6
)
updated version of boost shared ptr debugging patch
author
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 12 Mar 2014 22:47:49 +0000
(18:47 -0400)
committer
Paul Davis
<paul@linuxaudiosystems.com>
Wed, 12 Mar 2014 22:47:49 +0000
(18:47 -0400)
tools/boost-ptr-debug.patch
patch
|
blob
|
history
diff --git
a/tools/boost-ptr-debug.patch
b/tools/boost-ptr-debug.patch
index d5c49d96adc8a9b5f1f662002eb7a92d8b9f266e..e32975ab2b748ae2faa56dd376a06bb829777546 100644
(file)
--- a/
tools/boost-ptr-debug.patch
+++ b/
tools/boost-ptr-debug.patch
@@
-1,7
+1,7
@@
---- shared_ptr.hpp.
ORIG 2009-11-25 15:30:43.000000000 -05
00
-+++ shared_ptr.hpp 20
09-12-26 10:04:49.000000000 -05
00
-@@ -5
5,6 +55
,13 @@
- #
pragma warning(disable:4284) // odd return type for operator->
+--- shared_ptr.hpp.
clean 2014-03-12 10:32:10.054102239 -04
00
++++ shared_ptr.hpp 20
14-03-12 10:34:09.413172291 -04
00
+@@ -5
1,6 +51
,13 @@
+ #
endif
#endif
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
#endif
+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
@@
-14,7
+14,7
@@
namespace boost
{
namespace boost
{
-@@ -1
81,12 +188
,31 @@
+@@ -1
77,12 +184
,31 @@
shared_ptr(): px(0), pn() // never throws in 1.30+
{
shared_ptr(): px(0), pn() // never throws in 1.30+
{
@@
-46,7
+46,7
@@
}
//
}
//
-@@ -19
7,7 +223
,10 @@
+@@ -19
3,7 +219
,10 @@
template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
{
template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d)
{
@@
-58,7
+58,7
@@
}
// As above, but with allocator. A's copy constructor shall not throw.
}
// As above, but with allocator. A's copy constructor shall not throw.
-@@ -20
5,6 +234
,9 @@
+@@ -20
1,6 +230
,9 @@
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
{
boost::detail::sp_enable_shared_from_this( this, p, p );
template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a )
{
boost::detail::sp_enable_shared_from_this( this, p, p );
@@
-67,8
+67,8
@@
+#endif
}
+#endif
}
- // generated copy constructor, destructor are fine
-@@ -2
14,6 +246
,9 @@
+ // generated copy constructor, destructor are fine
...
+@@ -2
20,6 +252
,9 @@
{
// it is now safe to copy r.px, as pn(r.pn) did not throw
px = r.px;
{
// it is now safe to copy r.px, as pn(r.pn) did not throw
px = r.px;
@@
-78,7
+78,7
@@
}
template<class Y>
}
template<class Y>
-@@ -22
3,6 +258
,9 @@
+@@ -22
9,6 +264
,9 @@
{
px = r.px;
}
{
px = r.px;
}
@@
-88,7
+88,7
@@
}
template<class Y>
}
template<class Y>
-@@ -2
37,22 +275
,34 @@
+@@ -2
43,22 +281
,34 @@
#endif
: px( r.px ), pn( r.pn ) // never throws
{
#endif
: px( r.px ), pn( r.pn ) // never throws
{
@@
-123,7
+123,7
@@
}
template<class Y>
}
template<class Y>
-@@ -26
2,6 +312
,9 @@
+@@ -26
8,6 +318
,9 @@
{
pn = boost::detail::shared_count();
}
{
pn = boost::detail::shared_count();
}
@@
-133,7
+133,7
@@
}
template<class Y>
}
template<class Y>
-@@ -27
1,6 +324
,9 @@
+@@ -27
7,6 +330
,9 @@
{
boost::throw_exception(std::bad_cast());
}
{
boost::throw_exception(std::bad_cast());
}
@@
-143,7
+143,7
@@
}
#ifndef BOOST_NO_AUTO_PTR
}
#ifndef BOOST_NO_AUTO_PTR
-@@ -28
1,6 +337
,9 @@
+@@ -28
7,6 +343
,9 @@
Y * tmp = r.get();
pn = boost::detail::shared_count(r);
boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
Y * tmp = r.get();
pn = boost::detail::shared_count(r);
boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
@@
-153,7
+153,7
@@
}
#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
}
#if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION )
-@@ -29
1,6 +350
,9 @@
+@@ -29
7,6 +356
,9 @@
typename Ap::element_type * tmp = r.get();
pn = boost::detail::shared_count( r );
boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
typename Ap::element_type * tmp = r.get();
pn = boost::detail::shared_count( r );
boost::detail::sp_enable_shared_from_this( this, tmp, tmp );
@@
-163,7
+163,7
@@
}
}
-@@ -30
2,6 +364
,9 @@
+@@ -30
8,6 +370
,9 @@
shared_ptr & operator=( shared_ptr const & r ) // never throws
{
shared_ptr & operator=( shared_ptr const & r ) // never throws
{
@@
-173,7
+173,7
@@
this_type(r).swap(*this);
return *this;
}
this_type(r).swap(*this);
return *this;
}
-@@ -31
1,6 +376
,9 @@
+@@ -31
7,6 +382
,9 @@
template<class Y>
shared_ptr & operator=(shared_ptr<Y> const & r) // never throws
{
template<class Y>
shared_ptr & operator=(shared_ptr<Y> const & r) // never throws
{
@@
-183,7
+183,7
@@
this_type(r).swap(*this);
return *this;
}
this_type(r).swap(*this);
return *this;
}
-@@ -32
2,6 +390
,9 @@
+@@ -32
8,6 +396
,9 @@
template<class Y>
shared_ptr & operator=( std::auto_ptr<Y> & r )
{
template<class Y>
shared_ptr & operator=( std::auto_ptr<Y> & r )
{
@@
-193,7
+193,7
@@
this_type(r).swap(*this);
return *this;
}
this_type(r).swap(*this);
return *this;
}
-@@ -3
48,6 +419
,9 @@
+@@ -3
54,6 +425
,9 @@
{
pn.swap( r.pn );
r.px = 0;
{
pn.swap( r.pn );
r.px = 0;
@@
-203,34
+203,34
@@
}
template<class Y>
}
template<class Y>
-@@ -3
64,10 +438
,16 @@
+@@ -3
70,10 +444
,16 @@
{
pn.swap( r.pn );
r.px = 0;
{
pn.swap( r.pn );
r.px = 0;
-+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
-+
boost_debug_shared_ptr_constructor (this, px,
use_count());
-+#endif
++
+
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
++
+ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.
use_count());
++
+
#endif
}
shared_ptr & operator=( shared_ptr && r ) // never throws
{
}
shared_ptr & operator=( shared_ptr && r ) // never throws
{
-+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
-+
boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count());
-+#endif
- this_type( st
d::move
( r ) ).swap( *this );
++
+
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
++
+
boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count());
++
+
#endif
+ this_type( st
atic_cast< shared_ptr && >
( r ) ).swap( *this );
return *this;
}
return *this;
}
-@@ -3
75,6 +455
,9 @@
+@@ -3
81,6 +461
,9 @@
template<class Y>
shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
{
template<class Y>
shared_ptr & operator=( shared_ptr<Y> && r ) // never throws
{
-+#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
-+
boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count());
-+#endif
- this_type( st
d::move
( r ) ).swap( *this );
++
+
#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
++
+
boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count());
++
+
#endif
+ this_type( st
atic_cast< shared_ptr<Y> && >
( r ) ).swap( *this );
return *this;
}
return *this;
}
-@@ -38
3,27 +466
,42 @@
+@@ -38
9,27 +472
,42 @@
void reset() // never throws in 1.30+
{
void reset() // never throws in 1.30+
{