mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-02 20:58:15 +00:00
Make the string type elements "immutable", akin to char const * in C
Allows for extra security and optimization benefits
This commit is contained in:
@@ -62,7 +62,7 @@ write_rune :: proc(b: ^Builder, r: rune) -> int {
|
||||
}
|
||||
|
||||
write_string :: proc(b: ^Builder, s: string) {
|
||||
write_bytes(b, cast([]byte)s);
|
||||
write_bytes(b, transmute([]byte)s);
|
||||
}
|
||||
|
||||
write_bytes :: proc(b: ^Builder, x: []byte) {
|
||||
|
||||
Reference in New Issue
Block a user