Make the string type elements "immutable", akin to char const * in C

Allows for extra security and optimization benefits
This commit is contained in:
gingerBill
2019-12-01 14:10:59 +00:00
parent 7fbe0a6f23
commit 9db81498d8
25 changed files with 255 additions and 176 deletions
+1 -1
View File
@@ -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) {