diff --git a/Examples/test-suite/li_boost_intrusive_ptr.i b/Examples/test-suite/li_boost_intrusive_ptr.i index 2efa998a9..4916d0285 100644 --- a/Examples/test-suite/li_boost_intrusive_ptr.i +++ b/Examples/test-suite/li_boost_intrusive_ptr.i @@ -13,9 +13,12 @@ %warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerived; %warnfilter(SWIGWARN_LANG_SMARTPTR_MISSING) KlassDerivedDerived; -%inline %{ -#include "boost/shared_ptr.hpp" -#include "boost/intrusive_ptr.hpp" +%{ +template void intrusive_ptr_add_ref(const T* r) { r->addref(); } +template void intrusive_ptr_release(const T* r) { r->release(); } + +#include +#include #include // Uncomment macro below to turn on intrusive_ptr memory leak checking as described above @@ -102,8 +105,6 @@ %ignore IgnoredRefCountingBase; %ignore *::operator=; -%ignore intrusive_ptr_add_ref; -%ignore intrusive_ptr_release; %newobject pointerownertest(); %newobject smartpointerpointerownertest(); @@ -430,10 +431,6 @@ template struct Pair : Base { Pair pair_id2(Pair p) { return p; } SwigBoost::intrusive_ptr< Pair > pair_id1(SwigBoost::intrusive_ptr< Pair > p) { return p; } -template void intrusive_ptr_add_ref(const T* r) { r->addref(); } - -template void intrusive_ptr_release(const T* r) { r->release(); } - long use_count(const SwigBoost::shared_ptr& sptr) { return sptr.use_count(); }