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:
parent
731180ac3e
commit
9b7042280c
3 changed files with 189 additions and 28 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue