summaryrefslogtreecommitdiff
path: root/lib/std/optparse.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 /lib/std/optparse.myr
parent0205329e24d0e078a8150020843586cbd12613c8 (diff)
downloadmc-ad4d1397fb08b0d205e623f9a7c74fa19afb1c8c.tar.gz
Make slpush take an address.
Diffstat (limited to 'lib/std/optparse.myr')
-rw-r--r--lib/std/optparse.myr4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/std/optparse.myr b/lib/std/optparse.myr
index 64dcbe0..62def36 100644
--- a/lib/std/optparse.myr
+++ b/lib/std/optparse.myr
@@ -64,7 +64,7 @@ const optparse = {args, def
]
optinit(&ctx, args, def)
while !optdone(&ctx)
- parsed.opts = slpush(parsed.opts, optnext(&ctx))
+ slpush(&parsed.opts, optnext(&ctx))
;;
if ctx.args.len < def.minargs
put("error: expected at least {} args, got {}\n", def.minargs, ctx.args.len)
@@ -164,7 +164,7 @@ const next = {ctx
goto foundopt
;;
else
- ctx.args = slpush(ctx.args, ctx.optargs[i])
+ slpush(&ctx.args, ctx.optargs[i])
;;
;;
:finishedopt