about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorAaron Turon <aturon@mozilla.com>2014-06-30 10:19:02 -0700
committerAlex Crichton <alex@alexcrichton.com>2014-07-03 10:55:14 -0700
commit8877b81f2cccfbbd6720e9ef81a8238fd188a63e (patch)
treecf51ee49c428ea4f348855fb24372436b37623e4 /src/rustllvm/ExecutionEngineWrapper.cpp
parent748b9477f8b0c0fdbb3a45a83bf6f26b5b6c3378 (diff)
downloadrust-8877b81f2cccfbbd6720e9ef81a8238fd188a63e.tar.gz
rust-8877b81f2cccfbbd6720e9ef81a8238fd188a63e.zip
Add os::join_paths, make setenv non-utf8 capable
This commit changes `os` in three ways:

* It adds a `join_paths` function that is the converse to `split_paths`,
  easing manipulation of the `PATH` environment variable according to
  platform conventions.

* **Breaking change**: It changes `split_paths` to no longer drop empty paths, since they are
  meaningful to some shells (where they are synonymous with the current
  working directory).

* It changes `setenv` to take a `BytesContainer` rather than a `&str`
  value, since environment variables may have non-utf8 values on some
  platforms. Since `&str` is a `BytesContainer`, this is *not* a
  breaking change.

Along the way, it also refactors the `split_paths` function so that
`cfg` switches are applied internally (and the function header is given
only once). This fixes a bug: the doc comment had an example for only
one platform.

[breaking-change]
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions