summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-11-11 04:46:38 -0500
committerJohn Wiegley <johnw@newartisans.com>2009-11-11 04:46:38 -0500
commitf0f1b0cdfa3a0a73695eda52b25de71bd40adc5a (patch)
treef0acb080410a32c215c2c1938811cc14d512b580 /src
parentf1b495abfea31f4777b74715631dd45f9f4d8ed1 (diff)
downloadfork-ledger-f0f1b0cdfa3a0a73695eda52b25de71bd40adc5a.tar.gz
fork-ledger-f0f1b0cdfa3a0a73695eda52b25de71bd40adc5a.tar.bz2
fork-ledger-f0f1b0cdfa3a0a73695eda52b25de71bd40adc5a.zip
Value.to_sequence returns a valid Python sequence
Diffstat (limited to 'src')
-rw-r--r--src/py_value.cc4
-rw-r--r--src/system.hh.in1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/py_value.cc b/src/py_value.cc
index e94e74c1..ee039519 100644
--- a/src/py_value.cc
+++ b/src/py_value.cc
@@ -327,6 +327,10 @@ void export_value()
.def("basetype", py_base_type)
;
+ class_< value_t::sequence_t > ("ValueSequence")
+ .def(vector_indexing_suite< value_t::sequence_t >());
+ ;
+
scope().attr("NULL_VALUE") = NULL_VALUE;
scope().attr("string_value") = &string_value;
scope().attr("mask_value") = &mask_value;
diff --git a/src/system.hh.in b/src/system.hh.in
index abb823dc..341ce129 100644
--- a/src/system.hh.in
+++ b/src/system.hh.in
@@ -249,6 +249,7 @@ void serialize(Archive& ar, istream_pos_type& pos, const unsigned int)
#include <unicodeobject.h>
#include <boost/python/module_init.hpp>
+#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#endif // HAVE_BOOST_PYTHON