mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-08 03:24:19 +00:00
Fix typos
This commit is contained in:
@@ -8,7 +8,7 @@ read_ptr :: proc(r: Reader, p: rawptr, byte_size: int, n_read: ^int = nil) -> (n
|
||||
return read(r, ([^]byte)(p)[:byte_size], n_read)
|
||||
}
|
||||
|
||||
read_slice :: proc(r: Reader, p: rawptr, byte_size: int, n_read: ^int = nil) -> (n: int, err: Error) {
|
||||
read_slice :: proc(r: Reader, slice: $S/[]$T, n_read: ^int = nil) -> (n: int, err: Error) {
|
||||
size := len(slice)*size_of(T)
|
||||
return read_ptr(w, raw_data(slice), size, n_read)
|
||||
}
|
||||
|
||||
@@ -114,19 +114,19 @@ read_ptr :: proc(f: ^File, data: rawptr, len: int) -> (n: int, err: Error) {
|
||||
/*
|
||||
`write_slice` is a utility procedure that writes the bytes points at `slice`.
|
||||
|
||||
It is equivalent to: `write(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0]))])`
|
||||
It is equivalent to: `write(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0])])`
|
||||
*/
|
||||
write_slice :: proc(f: ^File, slice: $S/[]$T) -> (n: int, err: Error) {
|
||||
return write(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0]))])
|
||||
return write(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0])])
|
||||
}
|
||||
|
||||
/*
|
||||
`read_slice` is a utility procedure that writes the bytes points at `slice`.
|
||||
|
||||
It is equivalent to: `read(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0]))])`
|
||||
It is equivalent to: `read(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0])])`
|
||||
*/
|
||||
read_slice :: proc(f: ^File, slice: $S/[]$T) -> (n: int, err: Error) {
|
||||
return read(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0]))])
|
||||
return read(f, ([^]byte)(raw_data(slice))[:len(slice)*size_of(slice[0])])
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user