diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07T12·11+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07T12·11+0000 |
commit | e2d5e40f4fdd98e5d2ad7b77c00fb97caa3aa259 (patch) | |
tree | b3b8ccf4d534ae55949b02107887574424041668 /src/libexpr/value-to-xml.cc | |
parent | 84ce7ac76feab6e9a5c074bd1b9550ae543d1db8 (diff) |
* Keep track of the source positions of attributes.
Diffstat (limited to 'src/libexpr/value-to-xml.cc')
-rw-r--r-- | src/libexpr/value-to-xml.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/libexpr/value-to-xml.cc b/src/libexpr/value-to-xml.cc index 58e89925ce43..821f715e23c8 100644 --- a/src/libexpr/value-to-xml.cc +++ b/src/libexpr/value-to-xml.cc @@ -28,7 +28,8 @@ static void showAttrs(EvalState & state, bool strict, Bindings & attrs, names.insert(i->first); foreach (StringSet::iterator, i, names) { XMLOpenElement _(doc, "attr", singletonAttrs("name", *i)); - printValueAsXML(state, strict, attrs[state.symbols.create(*i)], doc, context, drvsSeen); + printValueAsXML(state, strict, attrs[state.symbols.create(*i)].value, + doc, context, drvsSeen); } } @@ -71,12 +72,12 @@ static void printValueAsXML(EvalState & state, bool strict, Value & v, Path drvPath; a = v.attrs->find(state.sDrvPath); - if (a != v.attrs->end() && a->second.type == tString) - xmlAttrs["drvPath"] = drvPath = a->second.string.s; + if (a != v.attrs->end() && a->second.value.type == tString) + xmlAttrs["drvPath"] = drvPath = a->second.value.string.s; a = v.attrs->find(state.sOutPath); - if (a != v.attrs->end() && a->second.type == tString) - xmlAttrs["outPath"] = a->second.string.s; + if (a != v.attrs->end() && a->second.value.type == tString) + xmlAttrs["outPath"] = a->second.value.string.s; XMLOpenElement _(doc, "derivation", xmlAttrs); |