summaryrefslogtreecommitdiff
path: root/gnucash.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gnucash.cc')
-rw-r--r--gnucash.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnucash.cc b/gnucash.cc
index f035536f..c5b4dcc3 100644
--- a/gnucash.cc
+++ b/gnucash.cc
@@ -317,3 +317,22 @@ unsigned int gnucash_parser_t::parse(std::istream& in,
}
} // namespace ledger
+
+#ifdef USE_BOOST_PYTHON
+
+#include <boost/python.hpp>
+
+using namespace boost::python;
+using namespace ledger;
+
+BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(gnucash_parse_overloads,
+ gnucash_parser_t::parse, 2, 4)
+
+void export_gnucash() {
+ class_< gnucash_parser_t, bases<parser_t> > ("GnucashParser")
+ .def("test", &gnucash_parser_t::test)
+ .def("parse", &gnucash_parser_t::parse, gnucash_parse_overloads())
+ ;
+}
+
+#endif // USE_BOOST_PYTHON