summaryrefslogtreecommitdiff
path: root/mbld/deps.myr
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2016-02-02 11:30:24 -0800
committerOri Bernstein <ori@eigenstate.org>2016-02-02 11:30:24 -0800
commitad4d1397fb08b0d205e623f9a7c74fa19afb1c8c (patch)
tree98fae98b43ee63812619d17ce93e39c4104e1f89 /mbld/deps.myr
parent0205329e24d0e078a8150020843586cbd12613c8 (diff)
downloadmc-ad4d1397fb08b0d205e623f9a7c74fa19afb1c8c.tar.gz
Make slpush take an address.
Diffstat (limited to 'mbld/deps.myr')
-rw-r--r--mbld/deps.myr18
1 files changed, 9 insertions, 9 deletions
diff --git a/mbld/deps.myr b/mbld/deps.myr
index 8541f15..48211ee 100644
--- a/mbld/deps.myr
+++ b/mbld/deps.myr
@@ -112,7 +112,7 @@ const swapall = {srcs, suff
sl = [][:]
for s in srcs
- sl = std.slpush(sl, srcswapsuffix(s, suff))
+ std.slpush(&sl, srcswapsuffix(s, suff))
;;
-> sl
}
@@ -140,7 +140,7 @@ const srcdeps = {b, ds, g, path, obj, usefile
-> void
;;
- ds.depstk = std.slpush(ds.depstk, path)
+ std.slpush(&ds.depstk, path)
if std.htgetv(g.seen, path, false)
std.fput(1, "dependency loop involving {}:\n", path)
for d in ds.depstk
@@ -234,7 +234,7 @@ const getcflags = {ln, cflags, libs
| `std.Some m:
flags = std.strtok(m[1])
for fl in flags
- cflags = std.slpush(cflags, std.sldup(fl))
+ std.slpush(&cflags, std.sldup(fl))
;;
std.slfree(flags)
regex.matchfree(m)
@@ -245,7 +245,7 @@ const getcflags = {ln, cflags, libs
| `std.Some m:
flags = std.strtok(m[1])
for fl in flags
- libs = std.slpush(libs, std.sldup(fl))
+ std.slpush(&libs, std.sldup(fl))
;;
std.slfree(flags)
regex.matchfree(m)
@@ -297,9 +297,9 @@ const depname = {deps, ln, lnum
match regex.exec(usepat, ln)
| `std.Some uses:
if uses[2].len > 0
- deps = std.slpush(deps, `Lib (std.sldup(uses[2]), lnum))
+ std.slpush(&deps, `Lib (std.sldup(uses[2]), lnum))
else
- deps = std.slpush(deps, `Local (std.sldup(uses[3]), lnum))
+ std.slpush(&deps, `Local (std.sldup(uses[3]), lnum))
;;
regex.matchfree(uses)
| `std.None:
@@ -343,10 +343,10 @@ const scrapelibs = {dg, lib, incs
match bio.getc(f)
| `bio.Ok 'L':
d = rdstr(f)
- deps = std.slpush(deps, d)
+ std.slpush(&deps, d)
| `bio.Ok 'X':
d = rdstr(f)
- dg.extlibs = std.slpush(dg.extlibs, d)
+ std.slpush(&dg.extlibs, d)
| `bio.Ok _: done = true
| `bio.Eof: done = true
| `bio.Err e: std.fatal("io error reading {}: {}", lib, e)
@@ -389,7 +389,7 @@ const pushdep = {dg, src, dst
std.put("{} <= {}\n", dst, src)
;;
sl = std.htgetv(dg.deps, dst, [][:])
- sl = std.slpush(sl, src)
+ std.slpush(&sl, src)
std.htput(dg.deps, dst, sl)
}