Skip to content

Commit

Permalink
Untyped record: Remove obsolete unsafe keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
badcel committed May 28, 2024
1 parent 50a0bd9 commit 31a2e20
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ private static string RenderFieldGetter(GirModel.Record record, GirModel.Field f
var typePrefix = field.AnyTypeOrCallback.IsT1 ? $"{Model.UntypedRecord.GetDataName(record)}." : string.Empty;
var dataName = Model.UntypedRecord.GetDataName(record);

return @$"public unsafe {typePrefix}{renderableField.NullableTypeName} Get{renderableField.Name}()
return @$"public {typePrefix}{renderableField.NullableTypeName} Get{renderableField.Name}()
{{
if (IsClosed || IsInvalid)
throw new InvalidOperationException(""Handle is closed or invalid"");
Expand All @@ -268,7 +268,7 @@ private static string RenderFieldSetter(GirModel.Record record, GirModel.Field f
{
var dataName = Model.UntypedRecord.GetDataName(record);

return @$"public unsafe void Set{renderableField.Name}({renderableField.NullableTypeName} value)
return @$"public void Set{renderableField.Name}({renderableField.NullableTypeName} value)
{{
if (IsClosed || IsInvalid)
throw new InvalidOperationException(""Handle is closed or invalid"");
Expand Down

0 comments on commit 31a2e20

Please sign in to comment.