summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-04 21:14:50 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-04 21:14:50 -0800
commit9edbd938a58bdcd53f38bc4b8fcdae73177432c4 (patch)
tree9db0236d4b1b903865a6e09ff7209408f193213b /lib
parent49d55e7425056ea5704fffe9f19f76c659079348 (diff)
downloadmc-9edbd938a58bdcd53f38bc4b8fcdae73177432c4.tar.gz
Make std.sljoin consistent.
Diffstat (limited to 'lib')
-rw-r--r--lib/bio/bio.myr2
-rw-r--r--lib/std/sljoin.myr10
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/bio/bio.myr b/lib/bio/bio.myr
index 6ca56d9..e63be54 100644
--- a/lib/bio/bio.myr
+++ b/lib/bio/bio.myr
@@ -536,7 +536,7 @@ const readinto = {f, buf, n
var ret
std.assert(f.rstart + n <= f.rend, "Reading too much from buffer")
- ret = std.sljoin(buf, f.rbuf[f.rstart:f.rstart + n])
+ ret = std.sljoin(&buf, f.rbuf[f.rstart:f.rstart + n])
f.rstart += n
-> ret
}
diff --git a/lib/std/sljoin.myr b/lib/std/sljoin.myr
index 7fadc27..7253d28 100644
--- a/lib/std/sljoin.myr
+++ b/lib/std/sljoin.myr
@@ -2,14 +2,14 @@ use "alloc"
use "slcp"
pkg std =
- generic sljoin : (dst : @a[:], src : @a[:] -> @a[:])
+ generic sljoin : (dst : @a[:]#, src : @a[:] -> @a[:])
;;
generic sljoin = {dst, src
var len
- len = dst.len
- dst = slgrow(dst, len + src.len)
- slcp(dst[len:], src)
- -> dst
+ len = dst#.len
+ dst# = slgrow(dst#, len + src.len)
+ slcp(dst#[len:], src)
+ -> dst#
}