Fix std::vector of pointers which failed if a pointer to a pointer of the container element type existed (Python)
Closes SF Bug 2359417 created after commit 93f0390322 (svn rev 10958)
This commit is contained in:
parent
9c3f608ef7
commit
6e9184b6f8
5 changed files with 120 additions and 9 deletions
|
|
@ -99,8 +99,21 @@ namespace swig {
|
|||
return traits<typename noconst_traits<Type >::noconst_type >::type_name();
|
||||
}
|
||||
|
||||
template <class Type>
|
||||
struct traits_info {
|
||||
template <class Type> struct traits_info {
|
||||
static swig_type_info *type_query(std::string name) {
|
||||
name += " *";
|
||||
return SWIG_TypeQuery(name.c_str());
|
||||
}
|
||||
static swig_type_info *type_info() {
|
||||
static swig_type_info *info = type_query(type_name<Type>());
|
||||
return info;
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
Partial specialization for pointers (traits_info)
|
||||
*/
|
||||
template <class Type> struct traits_info<Type *> {
|
||||
static swig_type_info *type_query(std::string name) {
|
||||
name += " *";
|
||||
return SWIG_TypeQuery(name.c_str());
|
||||
|
|
@ -117,7 +130,7 @@ namespace swig {
|
|||
}
|
||||
|
||||
/*
|
||||
Partial specialization for pointers
|
||||
Partial specialization for pointers (traits)
|
||||
*/
|
||||
template <class Type> struct traits <Type *> {
|
||||
typedef pointer_category category;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue