diff --git a/Source/Swig/stype.c b/Source/Swig/stype.c index aa5d448a3..707232558 100644 --- a/Source/Swig/stype.c +++ b/Source/Swig/stype.c @@ -550,7 +550,10 @@ String *SwigType_str(SwigType *s, const_String_or_char_ptr id) { int nelements, i; if (id) { - result = NewString(id); + /* stringify the id expanding templates, for example when the id is a fully qualified templated class name */ + String *id_str = NewString(id); /* unfortunate copy due to current const limitations */ + result = SwigType_str(id_str, 0); + Delete(id_str); } else { result = NewStringEmpty(); }