mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 20:13:40 +00:00
Implement strings the way Go itself does
This makes string slicing cheap.
This commit is contained in:
+2
-2
@@ -6,8 +6,8 @@
|
||||
|
||||
#define print(buf, len) write(STDOUT_FILENO, buf, len)
|
||||
|
||||
void __go_printstring(string_t *str) {
|
||||
write(STDOUT_FILENO, str->buf, str->len);
|
||||
void __go_printstring(string_t str) {
|
||||
write(STDOUT_FILENO, str.buf, str.len);
|
||||
}
|
||||
|
||||
void __go_printint(intgo_t n) {
|
||||
|
||||
Reference in New Issue
Block a user