replace leading _ for private symbols with keyword hide

This commit is contained in:
2026-07-14 20:19:01 +02:00
parent 5157cf3bcc
commit 267947e79d
31 changed files with 125220 additions and 122709 deletions
+10 -10
View File
@@ -2,25 +2,25 @@ arraylist :: import "@std/arraylist"
mem :: import "@std/mem"
std :: import "@std"
_fail_alloc func(_ ?*mut anyopaque, _ usize, _ usize) ?*mut u8 {
hide fail_alloc func(_ ?*mut anyopaque, _ usize, _ usize) ?*mut u8 {
return none
}
_fail_realloc func(_ ?*mut anyopaque, _ ?*mut u8, _ usize, _ usize, _ usize) ?*mut u8 {
hide fail_realloc func(_ ?*mut anyopaque, _ ?*mut u8, _ usize, _ usize, _ usize) ?*mut u8 {
return none
}
_fail_free func(_ ?*mut anyopaque, _ ?*mut u8, _ usize, _ usize) void {}
hide fail_free func(_ ?*mut anyopaque, _ ?*mut u8, _ usize, _ usize) void {}
_fail_vtable mem.AllocatorVTable :: mem.AllocatorVTable {
alloc = _fail_alloc,
realloc = _fail_realloc,
free = _fail_free,
hide fail_vtable mem.AllocatorVTable :: mem.AllocatorVTable {
alloc = fail_alloc,
realloc = fail_realloc,
free = fail_free,
}
_fail_allocator mem.Allocator :: mem.Allocator {
hide fail_allocator mem.Allocator :: mem.Allocator {
context = none,
vtable = &_fail_vtable,
vtable = &fail_vtable,
}
run func() i32 ! mem.AllocError {
@@ -59,7 +59,7 @@ run func() i32 ! mem.AllocError {
}
if (empty_values.items.len != 1) return 8
failed arraylist.ArrayList(i32) = arraylist.init(i32, _fail_allocator)
failed arraylist.ArrayList(i32) = arraylist.init(i32, fail_allocator)
failed_as_expected bool = false
arraylist.append(&failed, 1) catch |_| {
failed_as_expected = true