fix template_deftype to work with functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
201b47ae3c
commit
456649a242
1 changed files with 23 additions and 0 deletions
|
|
@ -162,3 +162,26 @@ namespace ns1 {
|
|||
}
|
||||
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
namespace hi
|
||||
{
|
||||
class CFoo
|
||||
{
|
||||
};
|
||||
|
||||
template<class T1, class T2 = T1> class CTemplate
|
||||
{
|
||||
};
|
||||
|
||||
typedef CTemplate<CFoo> TBla; // OK
|
||||
typedef void (*TFunc1)(CFoo arg); // OK
|
||||
typedef void (*TFunc2)(CTemplate<CFoo> arg); // crashes SWIG
|
||||
typedef void (*TFunc3)(CTemplate<CFoo>* arg); // crashes SWIG
|
||||
|
||||
|
||||
int foo(TFunc1 a, TFunc2 b, TFunc3 c);
|
||||
}
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue