Improve docs for core:bufio; Rename scanner_scan -> scan (keep alias of old name)

This commit is contained in:
gingerBill
2025-10-07 09:10:55 +01:00
parent 185e7cd538
commit 1708cb556a
3 changed files with 27 additions and 7 deletions
+2
View File
@@ -19,6 +19,7 @@ Writer :: struct {
}
// Initialized a Writer with an `allocator`
writer_init :: proc(b: ^Writer, wr: io.Writer, size: int = DEFAULT_BUF_SIZE, allocator := context.allocator) {
size := size
size = max(size, MIN_READ_BUFFER_SIZE)
@@ -27,6 +28,7 @@ writer_init :: proc(b: ^Writer, wr: io.Writer, size: int = DEFAULT_BUF_SIZE, all
b.buf = make([]byte, size, allocator)
}
// Initialized a Writer with a user provided buffer `buf`
writer_init_with_buf :: proc(b: ^Writer, wr: io.Writer, buf: []byte) {
writer_reset(b, wr)
b.buf_allocator = {}