summaryrefslogtreecommitdiff
path: root/src/py_commodity.cc
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-13 00:57:10 +0200
committerGitHub <noreply@github.com>2023-04-13 00:57:10 +0200
commitd8fefe9e82f99d4dab477a66c83cad64a8159c33 (patch)
tree27d1a5e41abca837b72cfcc81b0b5c365f7debe7 /src/py_commodity.cc
parent0c57796f86aeec45e106189aacfd50e1791d5605 (diff)
parent9244a27f9548a1d39fb01348fde66ff81f5150a4 (diff)
downloadfork-ledger-d8fefe9e82f99d4dab477a66c83cad64a8159c33.tar.gz
fork-ledger-d8fefe9e82f99d4dab477a66c83cad64a8159c33.tar.bz2
fork-ledger-d8fefe9e82f99d4dab477a66c83cad64a8159c33.zip
Merge pull request #2233 from afh/clean-up-class-list
Clean up class list
Diffstat (limited to 'src/py_commodity.cc')
-rw-r--r--src/py_commodity.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/py_commodity.cc b/src/py_commodity.cc
index 577254db..3ae6801f 100644
--- a/src/py_commodity.cc
+++ b/src/py_commodity.cc
@@ -39,6 +39,8 @@
namespace ledger {
+using namespace flags;
+using namespace python;
using namespace boost::python;
namespace {
@@ -119,8 +121,8 @@ namespace {
return (*i).second.get();
}
- python::list py_pool_keys(commodity_pool_t& pool) {
- python::list keys;
+ list py_pool_keys(commodity_pool_t& pool) {
+ list keys;
BOOST_REVERSE_FOREACH
(const commodity_pool_t::commodities_map::value_type& pair,
pool.commodities) {
@@ -295,15 +297,15 @@ void export_commodity()
.def("has_key", py_pool_contains)
.def("__contains__", py_pool_contains)
.def("__iter__",
- python::range<return_internal_reference<> >
+ boost::python::range<return_internal_reference<> >
(py_pool_commodities_begin, py_pool_commodities_end))
.def("iteritems",
- python::range<return_internal_reference<> >
+ boost::python::range<return_internal_reference<> >
(py_pool_commodities_begin, py_pool_commodities_end))
- .def("iterkeys", python::range<>(py_pool_commodities_keys_begin,
+ .def("iterkeys", boost::python::range<>(py_pool_commodities_keys_begin,
py_pool_commodities_keys_end))
.def("itervalues",
- python::range<return_internal_reference<> >
+ boost::python::range<return_internal_reference<> >
(py_pool_commodities_values_begin, py_pool_commodities_values_end))
;