summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/py_item.cc14
-rw-r--r--src/report.cc1
-rw-r--r--src/report.h4
3 files changed, 17 insertions, 2 deletions
diff --git a/src/py_item.cc b/src/py_item.cc
index 473bbef8..4dd104c9 100644
--- a/src/py_item.cc
+++ b/src/py_item.cc
@@ -32,6 +32,7 @@
#include <system.hh>
#include "pyinterp.h"
+#include "pyutils.h"
#include "scope.h"
#include "mask.h"
#include "item.h"
@@ -64,6 +65,13 @@ namespace {
return item.get_tag(tag_mask, value_mask);
}
+ std::string py_position_pathname(position_t const& pos) {
+ return pos.pathname.native();
+ }
+ void py_position_set_pathname(position_t& pos, string const& s) {
+ pos.pathname = s;
+ }
+
} // unnamed namespace
#if 0
@@ -79,8 +87,8 @@ void export_item()
{
class_< position_t > ("Position")
.add_property("pathname",
- make_getter(&position_t::pathname),
- make_setter(&position_t::pathname))
+ make_function(py_position_pathname),
+ make_function(py_position_set_pathname))
.add_property("beg_pos",
make_getter(&position_t::beg_pos),
make_setter(&position_t::beg_pos))
@@ -169,6 +177,8 @@ void export_item()
.def("valid", &item_t::valid)
;
+
+ register_optional_to_python<position_t>();
}
} // namespace ledger
diff --git a/src/report.cc b/src/report.cc
index 2ce70151..ac08c247 100644
--- a/src/report.cc
+++ b/src/report.cc
@@ -1198,6 +1198,7 @@ option_t<report_t> * report_t::lookup_option(const char * p)
OPT_CH(collapse);
else OPT(no_color);
else OPT(no_pager);
+ else OPT(no_revalued);
else OPT(no_rounding);
else OPT(no_titles);
else OPT(no_total);
diff --git a/src/report.h b/src/report.h
index c54c8444..10afbe6f 100644
--- a/src/report.h
+++ b/src/report.h
@@ -764,6 +764,10 @@ public:
OTHER(color).off();
});
+ OPTION_(report_t, no_revalued, DO() {
+ OTHER(revalued).off();
+ });
+
OPTION(report_t, no_rounding);
OPTION(report_t, no_titles);
OPTION(report_t, no_total);