fmt: fix and simplify align of struct fields (#21995)

This commit is contained in:
yuyi 2024-08-06 01:23:39 +08:00 committed by GitHub
parent 576a0abcc7
commit ddb6685d8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
139 changed files with 553 additions and 519 deletions

View file

@ -206,10 +206,10 @@ fn overhead_for(c &Chunk) usize {
// Why not `interface?` Interfaces require memory allocation so it is simpler to pass a struct.
pub struct Allocator {
pub:
alloc fn (voidptr, usize) (voidptr, usize, u32) = unsafe { nil }
alloc fn (voidptr, usize) (voidptr, usize, u32) = unsafe { nil }
remap fn (voidptr, voidptr, usize, usize, bool) voidptr = unsafe { nil }
free_part fn (voidptr, voidptr, usize, usize) bool = unsafe { nil }
free_ fn (voidptr, voidptr, usize) bool = unsafe { nil }
free_part fn (voidptr, voidptr, usize, usize) bool = unsafe { nil }
free_ fn (voidptr, voidptr, usize) bool = unsafe { nil }
can_release_part fn (voidptr, u32) bool = unsafe { nil }
allocates_zeros fn (voidptr) bool = unsafe { nil }
page_size fn (voidptr) usize = unsafe { nil } // not a constant field because some platforms might have different page sizes depending on configs