-
Notifications
You must be signed in to change notification settings - Fork 169
Open
Description
The code generator adds unsafe to functions that use pointers, but not fixed size buffers. This results in error CS0214: Pointers and fixed size buffers may only be used in an unsafe context
See microsoft/wdkmetadata#87 for an example.
Relevant code:
| private bool IsUnsafe(NamedDecl namedDecl, Type type) |
private bool IsUnsafe(NamedDecl namedDecl, Type type)
{
var remappedName = GetRemappedTypeName(namedDecl, context: null, type, out _, skipUsing: true, ignoreTransparentStructsWhereRequired: false);
return remappedName.Contains('*', StringComparison.Ordinal);
}Metadata
Metadata
Assignees
Labels
No labels