Allowing the empty %template directive, such as

%template() std::vector<int>;

to process the class "typedef"s and "typemap"s. Before
only the internal "typedef"s were processed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-03-17 08:18:17 +00:00
commit cf8a1c311c
3 changed files with 27 additions and 4 deletions

View file

@ -400,7 +400,9 @@ public:
fname = SwigType_typedef_resolve_all(name);
if (Strcmp(fname,name) != 0) {
cn = Swig_symbol_clookup_local(fname,0);
if ((!cn) || (Strcmp(nodeType(cn),"template") == 0)) {
if ((!cn) || (Strcmp(nodeType(cn),"template") == 0)
|| (Getattr(cn,"feature:onlychildren") != 0)
|| (Getattr(n,"feature:onlychildren") != 0)) {
Swig_symbol_cadd(fname,n);
SwigType_typedef_class(fname);
scopename = Copy(fname);