Browse Source

Simplified type maps by unlinking them from declarations.

Signed-off-by: Dimitar Dobrev <dpldobrev@protonmail.com>
pull/1157/head
Dimitar Dobrev 8 years ago
parent
commit
efa11ab745
  1. 5
      src/AST/CppTypePrinter.cs
  2. 14
      src/Generator/AST/Utils.cs
  3. 5
      src/Generator/Generators/CLI/CLIHeaders.cs
  4. 13
      src/Generator/Generators/CLI/CLIMarshal.cs
  5. 11
      src/Generator/Generators/CLI/CLISources.cs
  6. 2
      src/Generator/Generators/CLI/CLITypePrinter.cs
  7. 24
      src/Generator/Generators/CSharp/CSharpMarshal.cs
  8. 21
      src/Generator/Generators/CSharp/CSharpSources.cs
  9. 4
      src/Generator/Generators/CSharp/CSharpTypePrinter.cs
  10. 2
      src/Generator/Generators/TypePrinter.cs
  11. 16
      src/Generator/Passes/CheckIgnoredDecls.cs
  12. 2
      src/Generator/Passes/HandleDefaultParamValuesPass.cs
  13. 4
      src/Generator/Types/Std/Stdlib.cs
  14. 2
      src/Generator/Types/TypeIgnoreChecker.cs
  15. 5
      src/Generator/Types/TypeMap.cs
  16. 95
      src/Generator/Types/TypeMapDatabase.cs
  17. 2
      tests/CSharp/CSharp.cs

5
src/AST/CppTypePrinter.cs

@ -444,8 +444,9 @@ namespace CppSharp.AST
return typedef.OriginalName; return typedef.OriginalName;
var originalNamespace = typedef.OriginalNamespace.Visit(this); var originalNamespace = typedef.OriginalNamespace.Visit(this);
return originalNamespace == "::" ? typedef.OriginalName : return string.IsNullOrEmpty(originalNamespace) ||
$"{originalNamespace}::{typedef.OriginalName}"; originalNamespace == "::" ?
typedef.OriginalName : $"{originalNamespace}::{typedef.OriginalName}";
} }
public virtual string VisitTypeAliasDecl(TypeAlias typeAlias) public virtual string VisitTypeAliasDecl(TypeAlias typeAlias)

14
src/Generator/AST/Utils.cs

@ -96,7 +96,8 @@ namespace CppSharp.AST
if (specialization == null) if (specialization == null)
return true; return true;
if (IsSpecializationNeeded(container, typeMaps, internalOnly, specialization)) if (IsSpecializationNeeded(container, typeMaps, internalOnly,
type, specialization))
return false; return false;
if (!internalOnly) if (!internalOnly)
@ -104,7 +105,7 @@ namespace CppSharp.AST
if (IsSpecializationSelfContained(specialization, container)) if (IsSpecializationSelfContained(specialization, container))
return true; return true;
if (IsMappedToPrimitive(typeMaps, type, specialization)) if (IsMappedToPrimitive(typeMaps, type))
return true; return true;
} }
@ -161,11 +162,11 @@ namespace CppSharp.AST
} }
private static bool IsSpecializationNeeded(Declaration container, private static bool IsSpecializationNeeded(Declaration container,
ITypeMapDatabase typeMaps, bool internalOnly, ITypeMapDatabase typeMaps, bool internalOnly, Type type,
ClassTemplateSpecialization specialization) ClassTemplateSpecialization specialization)
{ {
TypeMap typeMap; TypeMap typeMap;
typeMaps.FindTypeMap(specialization, out typeMap); typeMaps.FindTypeMap(type, out typeMap);
return (!internalOnly && (((specialization.Ignore || return (!internalOnly && (((specialization.Ignore ||
specialization.TemplatedDecl.TemplatedClass.Ignore) && typeMap == null) || specialization.TemplatedDecl.TemplatedClass.Ignore) && typeMap == null) ||
@ -204,11 +205,10 @@ namespace CppSharp.AST
return false; return false;
} }
public static bool IsMappedToPrimitive(ITypeMapDatabase typeMaps, public static bool IsMappedToPrimitive(ITypeMapDatabase typeMaps, Type type)
Type type, Declaration declaration)
{ {
TypeMap typeMap; TypeMap typeMap;
if (!typeMaps.FindTypeMap(declaration, out typeMap)) if (!typeMaps.FindTypeMap(type, out typeMap))
return false; return false;
var typePrinterContext = new TypePrinterContext { Type = type }; var typePrinterContext = new TypePrinterContext { Type = type };

5
src/Generator/Generators/CLI/CLIHeaders.cs

@ -333,10 +333,7 @@ namespace CppSharp.Generators.CLI
var function = functionTemplate.TemplatedFunction; var function = functionTemplate.TemplatedFunction;
var typePrinter = new CLITypePrinter(Context) var typePrinter = new CLITypePrinter(Context);
{
Declaration = template
};
typePrinter.PushContext(TypePrinterContextKind.Template); typePrinter.PushContext(TypePrinterContextKind.Template);
var retType = function.ReturnType.Visit(typePrinter); var retType = function.ReturnType.Visit(typePrinter);

13
src/Generator/Generators/CLI/CLIMarshal.cs

@ -237,7 +237,8 @@ namespace CppSharp.Generators.CLI
var decl = typedef.Declaration; var decl = typedef.Declaration;
TypeMap typeMap; TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling) if (Context.Context.TypeMaps.FindTypeMap(decl.Type, out typeMap) &&
typeMap.DoesMarshalling)
{ {
typeMap.Type = typedef; typeMap.Type = typedef;
typeMap.CLIMarshalToManaged(Context); typeMap.CLIMarshalToManaged(Context);
@ -298,7 +299,7 @@ namespace CppSharp.Generators.CLI
instance += "&"; instance += "&";
instance += Context.ReturnVarName; instance += Context.ReturnVarName;
var needsCopy = !(Context.Declaration is Field); var needsCopy = Context.MarshalKind != MarshalKind.NativeField;
if (@class.IsRefType && needsCopy) if (@class.IsRefType && needsCopy)
{ {
@ -608,7 +609,8 @@ namespace CppSharp.Generators.CLI
var decl = typedef.Declaration; var decl = typedef.Declaration;
TypeMap typeMap; TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling) if (Context.Context.TypeMaps.FindTypeMap(decl.Type, out typeMap) &&
typeMap.DoesMarshalling)
{ {
typeMap.CLIMarshalToNative(Context); typeMap.CLIMarshalToNative(Context);
return typeMap.IsValueType; return typeMap.IsValueType;
@ -689,14 +691,15 @@ namespace CppSharp.Generators.CLI
private void MarshalRefClass(Class @class) private void MarshalRefClass(Class @class)
{ {
var type = Context.Parameter.Type.Desugar();
TypeMap typeMap; TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(@class, out typeMap) && typeMap.DoesMarshalling) if (Context.Context.TypeMaps.FindTypeMap(type, out typeMap) &&
typeMap.DoesMarshalling)
{ {
typeMap.CLIMarshalToNative(Context); typeMap.CLIMarshalToNative(Context);
return; return;
} }
var type = Context.Parameter.Type.Desugar();
var method = Context.Function as Method; var method = Context.Function as Method;
if (type.IsReference() && (method == null || if (type.IsReference() && (method == null ||
// redundant for comparison operators, they are handled in a special way // redundant for comparison operators, they are handled in a special way

11
src/Generator/Generators/CLI/CLISources.cs

@ -289,10 +289,7 @@ namespace CppSharp.Generators.CLI
var function = template.TemplatedFunction; var function = template.TemplatedFunction;
var typePrinter = new CLITypePrinter(Context) var typePrinter = new CLITypePrinter(Context);
{
Declaration = template
};
typePrinter.PushContext(TypePrinterContextKind.Template); typePrinter.PushContext(TypePrinterContextKind.Template);
var retType = function.ReturnType.Visit(typePrinter); var retType = function.ReturnType.Visit(typePrinter);
@ -485,12 +482,11 @@ namespace CppSharp.Generators.CLI
var ctx = new MarshalContext(Context, CurrentIndentation) var ctx = new MarshalContext(Context, CurrentIndentation)
{ {
Declaration = decl,
ArgName = decl.Name, ArgName = decl.Name,
ReturnVarName = variable, ReturnVarName = variable,
ReturnType = decl.QualifiedType ReturnType = decl.QualifiedType
}; };
ctx.PushMarshalKind(MarshalKind.NativeField);
var marshal = new CLIMarshalNativeToManagedPrinter(ctx); var marshal = new CLIMarshalNativeToManagedPrinter(ctx);
decl.Visit(marshal); decl.Visit(marshal);
@ -691,10 +687,9 @@ namespace CppSharp.Generators.CLI
ArgName = property.Name, ArgName = property.Name,
ReturnVarName = nativeField, ReturnVarName = nativeField,
ReturnType = property.QualifiedType, ReturnType = property.QualifiedType,
Declaration = property.Field,
ParameterIndex = paramIndex++ ParameterIndex = paramIndex++
}; };
ctx.PushMarshalKind(MarshalKind.NativeField);
var marshal = new CLIMarshalNativeToManagedPrinter(ctx); var marshal = new CLIMarshalNativeToManagedPrinter(ctx);
property.Visit(marshal); property.Visit(marshal);

2
src/Generator/Generators/CLI/CLITypePrinter.cs

@ -197,7 +197,7 @@ namespace CppSharp.Generators.CLI
var decl = typedef.Declaration; var decl = typedef.Declaration;
TypeMap typeMap = null; TypeMap typeMap = null;
if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) if (TypeMapDatabase.FindTypeMap(decl.Type, out typeMap))
{ {
typeMap.Type = typedef; typeMap.Type = typedef;
var typePrinterContext = new TypePrinterContext { Type = typedef }; var typePrinterContext = new TypePrinterContext { Type = typedef };

24
src/Generator/Generators/CSharp/CSharpMarshal.cs

@ -58,17 +58,7 @@ namespace CppSharp.Generators.CSharp
return true; return true;
} }
public override bool VisitDeclaration(Declaration decl) public override bool VisitDeclaration(Declaration decl) => true;
{
TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
{
typeMap.CSharpMarshalToManaged(Context);
return false;
}
return true;
}
public override bool VisitArrayType(ArrayType array, TypeQualifiers quals) public override bool VisitArrayType(ArrayType array, TypeQualifiers quals)
{ {
@ -431,17 +421,7 @@ namespace CppSharp.Generators.CSharp
return true; return true;
} }
public override bool VisitDeclaration(Declaration decl) public override bool VisitDeclaration(Declaration decl) => true;
{
TypeMap typeMap;
if (Context.Context.TypeMaps.FindTypeMap(decl, out typeMap) && typeMap.DoesMarshalling)
{
typeMap.CSharpMarshalToNative(Context);
return false;
}
return true;
}
public override bool VisitArrayType(ArrayType array, TypeQualifiers quals) public override bool VisitArrayType(ArrayType array, TypeQualifiers quals)
{ {

21
src/Generator/Generators/CSharp/CSharpSources.cs

@ -910,7 +910,8 @@ namespace CppSharp.Generators.CSharp
ctx.PushMarshalKind(MarshalKind.NativeField); ctx.PushMarshalKind(MarshalKind.NativeField);
var marshal = new CSharpMarshalManagedToNativePrinter(ctx); var marshal = new CSharpMarshalManagedToNativePrinter(ctx);
ctx.Declaration = field; ctx.PushMarshalKind(MarshalKind.NativeField);
ctx.ReturnType = field.QualifiedType;
param.Visit(marshal); param.Visit(marshal);
@ -1188,14 +1189,13 @@ namespace CppSharp.Generators.CSharp
// IntPtr ensures that non-copying object constructor is invoked. // IntPtr ensures that non-copying object constructor is invoked.
Class typeClass; Class typeClass;
if (field.Type.TryGetClass(out typeClass) && !typeClass.IsValueType && if (field.Type.TryGetClass(out typeClass) && !typeClass.IsValueType &&
!ASTUtils.IsMappedToPrimitive(Context.TypeMaps, field.Type, typeClass)) !ASTUtils.IsMappedToPrimitive(Context.TypeMaps, field.Type))
returnVar = $"new {CSharpTypePrinter.IntPtrType}(&{returnVar})"; returnVar = $"new {CSharpTypePrinter.IntPtrType}(&{returnVar})";
} }
var ctx = new CSharpMarshalContext(Context, CurrentIndentation) var ctx = new CSharpMarshalContext(Context, CurrentIndentation)
{ {
ArgName = field.Name, ArgName = field.Name,
Declaration = field,
ReturnVarName = returnVar, ReturnVarName = returnVar,
ReturnType = returnType ReturnType = returnType
}; };
@ -2734,16 +2734,17 @@ namespace CppSharp.Generators.CSharp
var indirectRetType = originalFunction.Parameters.First( var indirectRetType = originalFunction.Parameters.First(
parameter => parameter.Kind == ParameterKind.IndirectReturnType); parameter => parameter.Kind == ParameterKind.IndirectReturnType);
Class retClass; Type type = indirectRetType.Type.Desugar();
indirectRetType.Type.Desugar().TryGetClass(out retClass);
TypeMap typeMap; TypeMap typeMap;
string construct = null; string construct = null;
if (Context.TypeMaps.FindTypeMap(retClass, out typeMap)) if (Context.TypeMaps.FindTypeMap(type, out typeMap))
construct = typeMap.CSharpConstruct(); construct = typeMap.CSharpConstruct();
if (construct == null) if (construct == null)
{ {
Class retClass;
type.TryGetClass(out retClass);
var @class = retClass.OriginalClass ?? retClass; var @class = retClass.OriginalClass ?? retClass;
WriteLine($@"var {Helpers.ReturnIdentifier} = new { WriteLine($@"var {Helpers.ReturnIdentifier} = new {
TypePrinter.PrintNative(@class)}();"); TypePrinter.PrintNative(@class)}();");
@ -2752,10 +2753,10 @@ namespace CppSharp.Generators.CSharp
{ {
if (string.IsNullOrWhiteSpace(construct)) if (string.IsNullOrWhiteSpace(construct))
{ {
var typePrinterContext = new TypePrinterContext var typePrinterContext = new TypePrinterContext
{ {
Type = indirectRetType.Type.Desugar() Type = indirectRetType.Type.Desugar()
}; };
WriteLine("{0} {1};", typeMap.CSharpSignatureType(typePrinterContext), WriteLine("{0} {1};", typeMap.CSharpSignatureType(typePrinterContext),
Helpers.ReturnIdentifier); Helpers.ReturnIdentifier);

4
src/Generator/Generators/CSharp/CSharpTypePrinter.cs

@ -31,7 +31,7 @@ namespace CppSharp.Generators.CSharp
return string.Empty; return string.Empty;
TypeMap typeMap; TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(tag.Declaration, out typeMap)) if (TypeMapDatabase.FindTypeMap(tag, out typeMap))
{ {
typeMap.Type = tag; typeMap.Type = tag;
@ -271,7 +271,7 @@ namespace CppSharp.Generators.CSharp
var decl = typedef.Declaration; var decl = typedef.Declaration;
TypeMap typeMap; TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(decl, out typeMap)) if (TypeMapDatabase.FindTypeMap(decl.Type, out typeMap))
{ {
typeMap.Type = typedef; typeMap.Type = typedef;

2
src/Generator/Generators/TypePrinter.cs

@ -50,8 +50,6 @@ namespace CppSharp.Generators
} }
public MarshalKind PopMarshalKind() => marshalKinds.Pop(); public MarshalKind PopMarshalKind() => marshalKinds.Pop();
public Declaration Declaration;
public Parameter Parameter; public Parameter Parameter;
#region Dummy implementations #region Dummy implementations

16
src/Generator/Passes/CheckIgnoredDecls.cs

@ -111,7 +111,7 @@ namespace CppSharp.Passes
TypeMap typeMap; TypeMap typeMap;
if (!(type is FunctionType) && (decl == null || if (!(type is FunctionType) && (decl == null ||
((decl.GenerationKind != GenerationKind.Internal || ((decl.GenerationKind != GenerationKind.Internal ||
Context.TypeMaps.FindTypeMap(decl, out typeMap)) && Context.TypeMaps.FindTypeMap(type, out typeMap)) &&
!HasInvalidType(field, out msg)))) !HasInvalidType(field, out msg))))
return false; return false;
@ -513,11 +513,17 @@ namespace CppSharp.Passes
private bool IsDeclIgnored(Declaration decl) private bool IsDeclIgnored(Declaration decl)
{ {
var parameter = decl as Parameter; var parameter = decl as Parameter;
if (parameter != null && parameter.Type.Desugar().IsPrimitiveType(PrimitiveType.Null)) if (parameter != null)
return true; {
if (parameter.Type.Desugar().IsPrimitiveType(PrimitiveType.Null))
return true;
TypeMap typeMap; TypeMap typeMap;
return TypeMaps.FindTypeMap(decl, out typeMap) ? typeMap.IsIgnored : decl.Ignore; if (TypeMaps.FindTypeMap(parameter.Type, out typeMap))
return typeMap.IsIgnored;
}
return decl.Ignore;
} }
private void IgnoreUnsupportedTemplates(Class @class) private void IgnoreUnsupportedTemplates(Class @class)

2
src/Generator/Passes/HandleDefaultParamValuesPass.cs

@ -154,7 +154,7 @@ namespace CppSharp.Passes
var typePrinterResult = type.Visit(typePrinter).Type; var typePrinterResult = type.Visit(typePrinter).Type;
TypeMap typeMap; TypeMap typeMap;
if (TypeMaps.FindTypeMap(decl, type, out typeMap)) if (TypeMaps.FindTypeMap(type, out typeMap))
{ {
var typePrinterContext = new TypePrinterContext() var typePrinterContext = new TypePrinterContext()
{ {

4
src/Generator/Types/Std/Stdlib.cs

@ -221,11 +221,11 @@ namespace CppSharp.Types.Std
ClassTemplateSpecialization basicString = GetBasicString(type); ClassTemplateSpecialization basicString = GetBasicString(type);
var typePrinter = new CSharpTypePrinter(ctx.Context); var typePrinter = new CSharpTypePrinter(ctx.Context);
if (!ctx.Parameter.Type.Desugar().IsAddress() && if (!ctx.Parameter.Type.Desugar().IsAddress() &&
!(ctx.Declaration is Field)) ctx.MarshalKind != MarshalKind.NativeField)
ctx.Return.Write($"*({typePrinter.PrintNative(basicString)}*) "); ctx.Return.Write($"*({typePrinter.PrintNative(basicString)}*) ");
string qualifiedBasicString = GetQualifiedBasicString(basicString); string qualifiedBasicString = GetQualifiedBasicString(basicString);
var assign = basicString.Methods.First(m => m.OriginalName == "assign"); var assign = basicString.Methods.First(m => m.OriginalName == "assign");
if (ctx.Declaration is Field) if (ctx.MarshalKind == MarshalKind.NativeField)
{ {
ctx.Return.Write($@"{qualifiedBasicString}Extensions.{ ctx.Return.Write($@"{qualifiedBasicString}Extensions.{
Helpers.InternalStruct}.{assign.Name}(new { Helpers.InternalStruct}.{assign.Name}(new {

2
src/Generator/Types/TypeIgnoreChecker.cs

@ -88,7 +88,7 @@ namespace CppSharp
public override bool VisitTypedefDecl(TypedefDecl typedef) public override bool VisitTypedefDecl(TypedefDecl typedef)
{ {
TypeMap typeMap; TypeMap typeMap;
if (TypeMapDatabase.FindTypeMap(typedef, out typeMap)) if (TypeMapDatabase.FindTypeMap(typedef.Type, out typeMap))
{ {
if (typeMap.IsIgnored) if (typeMap.IsIgnored)
Ignore(); Ignore();

5
src/Generator/Types/TypeMap.cs

@ -104,10 +104,7 @@ namespace CppSharp.Types
public interface ITypeMapDatabase public interface ITypeMapDatabase
{ {
bool FindTypeMapRecursive(Type type, out TypeMap typeMap);
bool FindTypeMap(Type decl, out TypeMap typeMap); bool FindTypeMap(Type decl, out TypeMap typeMap);
bool FindTypeMap(Declaration decl, out TypeMap typeMap); bool FindTypeMap(Declaration declaration, out TypeMap typeMap);
} }
} }

95
src/Generator/Types/TypeMapDatabase.cs

@ -50,58 +50,6 @@ namespace CppSharp.Types
} }
} }
public bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap)
{
if (type != null && typeMaps.ContainsKey(type))
{
typeMap = typeMaps[type];
return typeMap.IsEnabled;
}
// We try to find type maps from the most qualified to less qualified
// types. Example: '::std::vector', 'std::vector' and 'vector'
var typePrinter = new CppTypePrinter { PrintLogicalNames = true };
if (FindTypeMap(decl, type, out typeMap, typePrinter))
return true;
typePrinter.PrintScopeKind = TypePrintScopeKind.Qualified;
if (FindTypeMap(decl, type, out typeMap, typePrinter))
return true;
typePrinter.ResolveTypedefs = true;
if (FindTypeMap(decl, type, out typeMap, typePrinter))
return true;
typePrinter.ResolveTypedefs = false;
typePrinter.PrintScopeKind = TypePrintScopeKind.Local;
if (FindTypeMap(decl, type, out typeMap, typePrinter))
return true;
var specialization = decl as ClassTemplateSpecialization;
if (specialization != null &&
FindTypeMap(specialization.TemplatedDecl, type, out typeMap, typePrinter))
return true;
var typedef = decl as TypedefDecl;
return typedef != null && FindTypeMap(typedef.Type, out typeMap);
}
private bool FindTypeMap(Declaration decl, Type type, out TypeMap typeMap, CppTypePrinter typePrinter)
{
if (FindTypeMap(decl.Visit(typePrinter), out typeMap))
{
if (type != null && typeMap.Type == null)
{
typeMap.Type = type;
typeMaps[type] = typeMap;
}
return true;
}
return false;
}
public bool FindTypeMap(Type type, out TypeMap typeMap) public bool FindTypeMap(Type type, out TypeMap typeMap)
{ {
if (typeMaps.ContainsKey(type)) if (typeMaps.ContainsKey(type))
@ -114,11 +62,19 @@ namespace CppSharp.Types
if (template != null) if (template != null)
{ {
var specialization = template.GetClassTemplateSpecialization(); var specialization = template.GetClassTemplateSpecialization();
if (specialization != null && FindTypeMap(specialization, type, out typeMap)) if (specialization != null &&
FindTypeMap(specialization, out typeMap))
return true; return true;
if (template.Template.TemplatedDecl != null) if (template.Template.TemplatedDecl != null)
return FindTypeMap(template.Template.TemplatedDecl, type, {
out typeMap); if (FindTypeMap(template.Template.TemplatedDecl,
out typeMap))
{
typeMap.Type = type;
return true;
}
return false;
}
} }
Type desugared = type.Desugar(); Type desugared = type.Desugar();
@ -147,33 +103,14 @@ namespace CppSharp.Types
typeMap = null; typeMap = null;
var typedef = type as TypedefType; var typedef = type as TypedefType;
return typedef != null && FindTypeMap(typedef.Declaration, type, out typeMap); return typedef != null && FindTypeMap(typedef.Declaration.Type, out typeMap);
} }
public bool FindTypeMap(Declaration decl, out TypeMap typeMap) public bool FindTypeMap(Declaration declaration, out TypeMap typeMap) =>
{ FindTypeMap(new TagType(declaration), out typeMap);
return FindTypeMap(decl, null, out typeMap);
}
public bool FindTypeMapRecursive(Type type, out TypeMap typeMap) private bool FindTypeMap(string name, out TypeMap typeMap) =>
{ TypeMaps.TryGetValue(name, out typeMap) && typeMap.IsEnabled;
while (true)
{
if (FindTypeMap(type, out typeMap))
return true;
var desugaredType = type.Desugar();
if (desugaredType == type)
return false;
type = desugaredType;
}
}
private bool FindTypeMap(string name, out TypeMap typeMap)
{
return TypeMaps.TryGetValue(name, out typeMap) && typeMap.IsEnabled;
}
private Dictionary<Type, TypeMap> typeMaps = new Dictionary<Type, TypeMap>(); private Dictionary<Type, TypeMap> typeMaps = new Dictionary<Type, TypeMap>();
} }

2
tests/CSharp/CSharp.cs

@ -179,7 +179,7 @@ namespace CppSharp.Tests
{ {
get get
{ {
var type = (TemplateSpecializationType)Type; var type = (TemplateSpecializationType) Type;
var pointeeType = type.Arguments[0].Type; var pointeeType = type.Arguments[0].Type;
var checker = new TypeIgnoreChecker(TypeMapDatabase); var checker = new TypeIgnoreChecker(TypeMapDatabase);
pointeeType.Visit(checker); pointeeType.Visit(checker);

Loading…
Cancel
Save