fix for 'template struct Opaque1 Type2

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6436 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-18 07:36:31 +00:00
commit 7010b3004e
2 changed files with 11 additions and 2 deletions

View file

@ -8,14 +8,19 @@
{
};
}
enum Hello { hi, hello };
%}
%inline {
namespace A {
struct OpaqueStruct;
typedef OpaqueStruct OpaqueType;
typedef struct OpaqueStruct OpaqueType;
typedef enum Hello Hi;
typedef std::vector<OpaqueType> OpaqueVectorType;
typedef std::vector<Hi> OpaqueVectorEnum;
void FillVector(OpaqueVectorType& v)
{
@ -23,6 +28,10 @@ namespace A {
v[i] = OpaqueStruct();
}
}
void FillVector(const OpaqueVectorEnum& v)
{
}
}
}

View file

@ -1329,7 +1329,7 @@ SwigType *Swig_symbol_typedef_reduce(SwigType *ty, Symtab *tab) {
Symtab *ntab;
SwigType *nt = Copy(Getattr(n,"type"));
#if 0
#if 1
/* Fix for case 'typedef struct Hello hello;' */
{
const char* dclass[3] = {"struct ", "union ", "class "};