Browse Source

Fix type printing of typedef qualifiers in C++ type printer.

pull/1318/head
João Matos 5 years ago committed by João Matos
parent
commit
1ad118ceba
  1. 10
      src/Generator/Generators/C/CppTypePrinter.cs

10
src/Generator/Generators/C/CppTypePrinter.cs

@ -204,9 +204,15 @@ namespace CppSharp.Generators.C @@ -204,9 +204,15 @@ namespace CppSharp.Generators.C
if (ResolveTypedefs && !typedef.Declaration.Type.IsPointerTo(out func))
{
TypePrinterResult type = typedef.Declaration.QualifiedType.Visit(this);
return new TypePrinterResult { Type = $"{qual}{type.Type}", NamePrefix = type.NamePrefix, NameSuffix = type.NameSuffix };
return new TypePrinterResult { Type = $"{qual}{type.Type}",
NamePrefix = type.NamePrefix, NameSuffix = type.NameSuffix };
}
return $"{qual}{typedef.Declaration.Visit(this)}";
var result = typedef.Declaration.Visit(this);
if (result.NamePrefix.Length > 0)
result.NamePrefix.Append($"{qual}");
return result;
}
public override TypePrinterResult VisitAttributedType(AttributedType attributed,

Loading…
Cancel
Save