diff options
| author | Brian Anderson <banderson@mozilla.com> | 2011-08-24 23:34:10 -0700 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2011-08-27 15:54:43 -0700 |
| commit | 85b4253bc1946a1e17fe7d93a80fbb5bea96ee27 (patch) | |
| tree | e1aa363c428ed3e9a1f7dd18a1b31b51bc9f72aa /src/comp/syntax | |
| parent | ccc68fc18b615561694650b25e665c257847cf67 (diff) | |
Convert std::generic_os to istrs. Issue #855
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ext/env.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/comp/syntax/ext/env.rs b/src/comp/syntax/ext/env.rs index 52a738ab97f..75fca2398eb 100644 --- a/src/comp/syntax/ext/env.rs +++ b/src/comp/syntax/ext/env.rs @@ -5,6 +5,7 @@ * interface. */ import std::vec; +import std::istr; import std::option; import std::generic_os; import base::*; @@ -26,9 +27,11 @@ fn expand_syntax_ext(cx: &ext_ctxt, sp: codemap::span, arg: @ast::expr, // option::t<str> rather than just an maybe-empty string. let var = expr_to_str(cx, args[0], "#env requires a string"); - alt generic_os::getenv(var) { + alt generic_os::getenv(istr::from_estr(var)) { option::none. { ret make_new_str(cx, sp, ""); } - option::some(s) { ret make_new_str(cx, sp, s); } + option::some(s) { + ret make_new_str(cx, sp, istr::to_estr(s)); + } } } |
