Fix boost intrusive_ptr testcase compilation with latest boost/gcc

This commit is contained in:
William S Fulton 2013-04-27 18:40:57 +01:00
commit 52858d5353

View file

@ -13,9 +13,12 @@
%warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerived; %warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerived;
%warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerivedDerived; %warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerivedDerived;
%inline %{ %{
#include "boost/shared_ptr.hpp" template<typename T> void intrusive_ptr_add_ref(const T* r) { r->addref(); }
#include "boost/intrusive_ptr.hpp" template<typename T> void intrusive_ptr_release(const T* r) { r->release(); }
#include <boost/shared_ptr.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/detail/atomic_count.hpp> #include <boost/detail/atomic_count.hpp>
// Uncomment macro below to turn on intrusive_ptr memory leak checking as described above // Uncomment macro below to turn on intrusive_ptr memory leak checking as described above
@ -102,8 +105,6 @@
%ignore IgnoredRefCountingBase; %ignore IgnoredRefCountingBase;
%ignore *::operator=; %ignore *::operator=;
%ignore intrusive_ptr_add_ref;
%ignore intrusive_ptr_release;
%newobject pointerownertest(); %newobject pointerownertest();
%newobject smartpointerpointerownertest(); %newobject smartpointerpointerownertest();
@ -430,10 +431,6 @@ template <class T1, class T2> struct Pair : Base<T1, T2> {
Pair<int, double> pair_id2(Pair<int, double> p) { return p; } Pair<int, double> pair_id2(Pair<int, double> p) { return p; }
SwigBoost::intrusive_ptr< Pair<int, double> > pair_id1(SwigBoost::intrusive_ptr< Pair<int, double> > p) { return p; } SwigBoost::intrusive_ptr< Pair<int, double> > pair_id1(SwigBoost::intrusive_ptr< Pair<int, double> > p) { return p; }
template<typename T> void intrusive_ptr_add_ref(const T* r) { r->addref(); }
template<typename T> void intrusive_ptr_release(const T* r) { r->release(); }
long use_count(const SwigBoost::shared_ptr<Space::Klass>& sptr) { long use_count(const SwigBoost::shared_ptr<Space::Klass>& sptr) {
return sptr.use_count(); return sptr.use_count();
} }