Improve director unwrap detection for the return type
Resolve the return type to correctly determine if the type is a pointer or reference to a director class. SwigType_refptr_count_return() recently added as a simpler fix is no longer needed. The conventional approach of using the "type" rather than "decl" to analyse the return type is used instead too. Issue #1823
This commit is contained in:
parent
4a397869a2
commit
2f55379687
10 changed files with 76 additions and 90 deletions
|
|
@ -25,6 +25,8 @@ class Element {
|
|||
return &selfptr;
|
||||
}
|
||||
};
|
||||
typedef Element * element_ptr_t;
|
||||
typedef Element & element_ref_t;
|
||||
|
||||
class Storage {
|
||||
public:
|
||||
|
|
@ -45,6 +47,15 @@ class Storage {
|
|||
Element *&getElementPtrRef() {
|
||||
return *getIt();
|
||||
}
|
||||
element_ref_t getElementRefTypedef() {
|
||||
return **getIt();
|
||||
}
|
||||
element_ptr_t getElementPtrTypedef() {
|
||||
return *getIt();
|
||||
}
|
||||
element_ptr_t &getElementPtrRefTypedef() {
|
||||
return *getIt();
|
||||
}
|
||||
};
|
||||
|
||||
template<class T> class StorageTmpl {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue