From 81c19e2e46cbd2e556610fb4ca128bcff785221c Mon Sep 17 00:00:00 2001 From: q66 Date: Wed, 17 Aug 2016 21:21:36 +0100 Subject: [PATCH] api fixes --- main.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.cc b/main.cc index eac6240..58da628 100644 --- a/main.cc +++ b/main.cc @@ -588,8 +588,8 @@ int main(int argc, char **argv) { cscript::init_libs(os); int ncpus = ostd::Thread::hardware_concurrency(); - os.add_ident("numcpus", 4096, 1, &ncpus); - os.add_ident("numjobs", 4096, 1, &os.jobs); + os.add_ident(new cscript::Ident("numcpus", 4096, 1, &ncpus)); + os.add_ident(new cscript::Ident("numjobs", 4096, 1, &os.jobs)); ConstCharRange fcont; ConstCharRange deffile = "obuild.cfg"; @@ -698,7 +698,7 @@ int main(int argc, char **argv) { os.add_command("glob", "C", [&os](TvalRange args, TaggedValue &res) { auto fnames = cscript::util::list_explode(args[0].get_strr()); - res.set_str(ob_expand_globs(fnames).disown()); + res.set_str(ostd::move(ob_expand_globs(fnames))); }); if ((!fcont.empty() && !os.run_bool(fcont)) || !os.run_file(deffile)) {