summaryrefslogtreecommitdiff
path: root/src/value.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-23 14:25:09 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-23 14:25:09 -0400
commitbc1a196f02e1db913dcfb1341abec03332e5c589 (patch)
treecb47da011c63e78d791a5bac7b172530b4682633 /src/value.h
parent30005d1ba5d87a972d3b68574d90e3af0159a576 (diff)
downloadfork-ledger-bc1a196f02e1db913dcfb1341abec03332e5c589.tar.gz
fork-ledger-bc1a196f02e1db913dcfb1341abec03332e5c589.tar.bz2
fork-ledger-bc1a196f02e1db913dcfb1341abec03332e5c589.zip
Added non-const value_t::begin and value_t::end
Diffstat (limited to 'src/value.h')
-rw-r--r--src/value.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/value.h b/src/value.h
index ec0a329a..ff80d8ab 100644
--- a/src/value.h
+++ b/src/value.h
@@ -826,6 +826,18 @@ public:
}
}
+ sequence_t::iterator begin() {
+ assert(is_sequence());
+ return as_sequence_lval().begin();
+ }
+
+ sequence_t::iterator end() {
+ assert(is_sequence());
+ // This special hack is because we never used end() in a context which
+ // needs us to call _dup().
+ return boost::get<sequence_t *>(storage->data)->end();
+ }
+
sequence_t::const_iterator begin() const {
assert(is_sequence());
return as_sequence().begin();