mirror of
https://github.com/odin-lang/Odin.git
synced 2026-08-29 08:21:32 +00:00
Change strings.Builder to be distinct [dynamic]byte from a struct wrapper
This commit is contained in:
@@ -68,9 +68,9 @@ _os_version :: proc (allocator: runtime.Allocator, loc := #caller_location) -> (
|
||||
build = string(cstring(raw_data(build_buf[:])))
|
||||
}
|
||||
ws(&b, " (build ")
|
||||
build_start := len(b.buf)
|
||||
build_start := len(b)
|
||||
ws(&b, build)
|
||||
res.release = string(b.buf[build_start:][:len(build)])
|
||||
res.release = string(b[build_start:][:len(build)])
|
||||
}
|
||||
|
||||
{
|
||||
|
||||
@@ -65,7 +65,7 @@ _os_version :: proc (allocator: runtime.Allocator, loc := #caller_location) -> (
|
||||
|
||||
release_i := strings.builder_len(b)
|
||||
strings.write_string(&b, string(cstring(&uts.release[0])))
|
||||
release_str := string(b.buf[release_i:])
|
||||
release_str := string(b[release_i:])
|
||||
|
||||
res.full = strings.to_string(b)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user