diff options
-rw-r--r-- | build2/functions-path.cxx | 21 | ||||
-rw-r--r-- | build2/types | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/build2/functions-path.cxx b/build2/functions-path.cxx index 3ee6361..8b88ba0 100644 --- a/build2/functions-path.cxx +++ b/build2/functions-path.cxx @@ -93,6 +93,27 @@ namespace build2 return r; }; + // representation + // + f["representation"] = [](path p) {return move (p).representation ();}; + f["representation"] = [](dir_path p) {return move (p).representation ();}; + + f["representation"] = [](paths v) + { + strings r; + for (auto& p: v) + r.push_back (move (p).representation ()); + return r; + }; + + f["representation"] = [](dir_paths v) + { + strings r; + for (auto& p: v) + r.push_back (move (p).representation ()); + return r; + }; + // canonicalize // f["canonicalize"] = [](path p) {p.canonicalize (); return p;}; diff --git a/build2/types b/build2/types index 9a5be75..c795213 100644 --- a/build2/types +++ b/build2/types @@ -220,7 +220,7 @@ namespace build2 } // In order to be found (via ADL) these have to be either in std:: or in -// butl::. The latter is bad idea since libbutl includes the default +// butl::. The latter is a bad idea since libbutl includes the default // implementation. They are defined in utility.cxx. // namespace std |