diff --git a/src/Generation/Generator/Renderer/Internal/UntypedRecordHandle.cs b/src/Generation/Generator/Renderer/Internal/UntypedRecordHandle.cs index 7b60df325..8934bcb33 100644 --- a/src/Generation/Generator/Renderer/Internal/UntypedRecordHandle.cs +++ b/src/Generation/Generator/Renderer/Internal/UntypedRecordHandle.cs @@ -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""); @@ -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"");