Browse Source

Handle more primitive types in `GetInfo`.

pull/1865/head
Joao Matos 11 months ago
parent
commit
6712a6a973
  1. 7
      src/Generator/Extensions/PrimitiveTypeExtensions.cs

7
src/Generator/Extensions/PrimitiveTypeExtensions.cs

@ -34,6 +34,11 @@ namespace CppSharp.Extensions
switch (primitive) switch (primitive)
{ {
case PrimitiveType.Void:
case PrimitiveType.Null:
case PrimitiveType.String:
return (0, 0);
case PrimitiveType.Bool: case PrimitiveType.Bool:
return (targetInfo.BoolWidth, targetInfo.BoolAlign); return (targetInfo.BoolWidth, targetInfo.BoolAlign);
@ -97,7 +102,7 @@ namespace CppSharp.Extensions
return (targetInfo.PointerWidth, targetInfo.PointerAlign); return (targetInfo.PointerWidth, targetInfo.PointerAlign);
default: default:
throw new NotImplementedException(); throw new Exception($"Not implemented for {primitive}");
} }
} }
} }

Loading…
Cancel
Save