Fix seg fault using %template

Fix seg fault when instantiating templates with parameters that are function
parameters containing templates, such as:

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

Closes #983
This commit is contained in:
William S Fulton 2023-01-03 23:53:34 +00:00
commit b18b75369c
4 changed files with 60 additions and 1 deletions

View file

@ -1746,7 +1746,7 @@ SwigType *Swig_symbol_typedef_reduce(const SwigType *ty, Symtab *tab) {
n = Swig_symbol_clookup(base, tab);
if (!n) {
if (SwigType_istemplate(ty)) {
if (SwigType_istemplate(base)) {
SwigType *qt = Swig_symbol_template_reduce(base, tab);
Append(prefix, qt);
Delete(qt);