From 40a430139edd12d9f580f5616571bc3ed8709d73 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 5 Nov 2009 02:22:17 -0500 Subject: Transactions, etc., are now accessed by iterators --- src/py_xact.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/py_xact.cc') diff --git a/src/py_xact.cc b/src/py_xact.cc index d98d226c..3755dcd1 100644 --- a/src/py_xact.cc +++ b/src/py_xact.cc @@ -88,9 +88,6 @@ void export_xact() return_value_policy()), make_setter(&xact_base_t::journal, with_custodian_and_ward<1, 2>())) - .add_property("posts", - make_getter(&xact_base_t::posts), - make_setter(&xact_base_t::posts)) .def("__len__", posts_len) .def("__getitem__", posts_getitem, @@ -100,6 +97,12 @@ void export_xact() .def("remove_post", &xact_base_t::add_post) .def("finalize", &xact_base_t::finalize) + + .def("__iter__", range > + (&xact_t::posts_begin, &xact_t::posts_end)) + .def("posts", range > + (&xact_t::posts_begin, &xact_t::posts_end)) + .def("valid", &xact_base_t::valid) ; -- cgit v1.2.3