Add member variable support for shared_ptr

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10260 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-02-14 22:53:11 +00:00
commit 9b7042280c
3 changed files with 189 additions and 28 deletions

View file

@ -211,6 +211,11 @@ Klass* arraytest(Klass k[]) {
*/
// Provide overloads for Klass and KlassDerived as some language modules, eg Python, create an extra reference in
// the marshalling if an upcast to a base class is required.
long use_count(const SwigBoost::shared_ptr<KlassDerived>& sptr) {
return sptr.use_count();
}
long use_count(const SwigBoost::shared_ptr<Klass>& sptr) {
return sptr.use_count();
}