Value.to_sequence returns a valid Python sequence

This commit is contained in:
John Wiegley 2009-11-11 04:46:38 -05:00
parent f1b495abfe
commit f0f1b0cdfa
2 changed files with 5 additions and 0 deletions

View file

@ -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;

View file

@ -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